Re: debugging

Todd Whiteman <[email protected]>
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
Anton Visser wrote:
> So I'm playing with a Python project and am having trouble setting a
> default file to use when debugging the project.  What I would like to
> have, is the ability to set  a default file that gets run each time,
> instead of the file I'm editing.  The benefit of this, would be that I
> could change a method within a class, hit the debug keystroke, and
> have Komodo execute the main file. I tried setting the script file in
> the debugging section of the project properties, but that didn't seem
> to do the trick.
> 
> Anyone have any insight for me?

Komodo's project system do not offer a specific project run/debug 
command, though it should be easy to add a Komodo macro or run command 
to your project that provides this.

Here is an example Komodo JavaScript macro that I use to start debugging 
a local Django application:

try {
     var koDirs = 
Components.classes["@activestate.com/koDirs;1"].getService(Components.interfaces.koIDirs);
     // Get the location of pydbgp python script
     var pydbgp = koDirs.binDBGPDir + "/pydbgp";
     Run_RunCommand(window,
                    "python " + pydbgp + " -d localhost:%(debugger:port) 
sandbox/manage.py runserver --noreload 8880",
                    "%p", null, false, false, true, "new-console");
} catch(ex) {
     alert(ex);
}


You can assign a keybinding to this, or just double-click on the macro 
to kick things off.

Cheers,
Todd

_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.