mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Merge pull request #84 from DonJayamanne/supportDebuggingModules
Enable debugging modules
This commit is contained in:
commit
41d654def1
1 changed files with 7 additions and 2 deletions
|
|
@ -19,11 +19,16 @@ def debug(filename, port_num, debug_id, debug_options, run_as):
|
|||
import ptvsd.wrapper
|
||||
import pydevd
|
||||
|
||||
sys.argv[1:0] = [
|
||||
args = [
|
||||
'--port', str(port_num),
|
||||
'--client', '127.0.0.1',
|
||||
'--file', filename,
|
||||
]
|
||||
if run_as == 'module':
|
||||
args.append('--module')
|
||||
args.extend(('--file', filename + ":"))
|
||||
else:
|
||||
args.extend(('--file', filename))
|
||||
sys.argv[1:0] = args
|
||||
try:
|
||||
pydevd.main()
|
||||
except SystemExit as ex:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue