9
Vote

Launch mode: embedded

description

Please have in python project's "Launch mode" ability to select something like "embedded" to provide command-line and working dir for embedding process.
This will allow to create a python project in solution of embedding application and then to set it as "Startup project" and debug python code without catching right moment to attach.
With deep respect, Alexander.

comments

dinov wrote Jan 12, 2012 at 4:43 PM

To some extent this is about parity w/ C# and other project systems. They have a "launch external program" option in the debug page which does this.

araud wrote Jan 13, 2012 at 6:57 AM

Right! Thanks!
For me this will be the reason to stop using winpdb.

Now I use next code to run and attach winpdb to the spot I want:


def debugger():
import rpdb2
if rpdb2.g_debugger: return
import os
import sys
file = __file__.lower()
file = file.rsplit(".", 1)[0] + ".py"
os.spawnv(
    os.P_NOWAIT,
    '%s/python' % sys.prefix,
    ['python', '%s/Lib/site-packages/winpdb.py' % sys.prefix, '-p123', '-a %s' % file]
)
rpdb2.start_embedded_debugger('123')
I am not sure if something like this is possible for PythonTools?
Just catching the moment to attach is too ineffective for active development.
But winpdb is external debugger and without ability to change code, so after 639 is done scales going to swing to the side of PythonTools :)