Merge pull request #84 from DonJayamanne/supportDebuggingModules

Enable debugging modules
This commit is contained in:
Karthik Nadig 2018-02-15 23:09:29 -08:00 committed by GitHub
commit 41d654def1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: