PY-27594 Disable debug when Python gets input from stdin

This commit is contained in:
Bernat Gabor
2018-05-13 12:52:27 -04:00
committed by Elizaveta Shashkova
parent d5848ac9da
commit 99df9e4259

View File

@@ -177,7 +177,11 @@ def patch_args(args):
# Always insert at pos == 1 (i.e.: pydevd "--module" --multiprocess ...)
original.insert(1, '--module')
else:
if args[i].startswith('-'):
if args[i] == '-':
# this is the marker that input is going to be from stdin for Python
# for now we just disable the debugging here, don't crash but is not supported
return args
elif args[i].startswith('-'):
new_args.append(args[i])
else:
break