ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> komodo-discuss
komodo-discuss
Re: [Komodo-discuss] debugging
by Todd Whiteman other posts by this author
Jun 3 2009 4:22PM messages near this date
view in the new Beta List Site
[Komodo-discuss] debugging | [Komodo-discuss] external diff
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
Komodo-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
Thread:
Anton Visser
Todd Whiteman

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved