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:
parent
099431ba55
commit
0cdab6be4e
7 changed files with 117 additions and 10 deletions
24
support/test/python/multiprocessing/.vimspector.json
Normal file
24
support/test/python/multiprocessing/.vimspector.json
Normal 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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
support/test/python/multiprocessing/multiprocessing_test.py
Normal file
27
support/test/python/multiprocessing/multiprocessing_test.py
Normal 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" )
|
||||
Loading…
Add table
Add a link
Reference in a new issue