|
I see, thanks for explanations!
Could you please at least provide a python code snippet that allows to attach automatically?
Idea is next: in my embedded python script I want to call something like "pytools.attach()" which makes Visual Studio to attach to this spot.
This is how I work with winpdb now. Here is code for winpdb:
def debug():
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', '-c \"import winpdb;winpdb.main()\"', '-p123', '-a %s' % file]
)
rpdb2.start_embedded_debugger('123')
It runs winpdb and makes it to attach tho the very place of debug() call.
Something like this would make embedded debugging possible until #639, #210 are implemented.
Thanks!
|