React to the debugpyAttach event and try and start a new session; this gets tripped up by the _vimspector.Variables (etc) buffers already existing. Probably need to add the sesssion ID to the buffer name

This commit is contained in:
Ben Jackson 2021-03-25 22:08:31 +00:00
commit 0cdab6be4e
7 changed files with 117 additions and 10 deletions

View file

@ -0,0 +1,24 @@
{
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
"configurations": {
"run": {
"adapter": "debugpy",
"configuration": {
"request": "launch",
"type": "python",
"cwd": "${workspaceRoot}",
"program": "${file}",
"stopOnEntry": false,
"console": "integratedTerminal",
"subProcess": true
},
"breakpoints": {
"exception": {
"raised": "N",
"uncaught": "Y",
"userUnhandled": ""
}
}
}
}
}

View file

@ -0,0 +1,27 @@
import time
import multiprocessing as mp
def First():
for _ in range( 100 ):
print( "in first" )
time.sleep( 0.1 )
def Second():
for _ in range( 100 ):
print( "in second" )
time.sleep( 0.1 )
print( "main" )
p1 = mp.Process( target=First )
p2 = mp.Process( target=Second )
p1.start()
p2.start()
p1.join()
p2.join()
print( "Done" )