mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix multiprocess debug for Python 3.3 on Windows (PY-8258).
This commit is contained in:
@@ -32,6 +32,9 @@ def getModuleName(prefix, cnt):
|
||||
return prefix + "%" + str(cnt)
|
||||
|
||||
def insert_to_sys_path(script_path):
|
||||
print(script_path)
|
||||
for s in sys.path:
|
||||
print(s)
|
||||
while script_path in sys.path:
|
||||
sys.path.remove(script_path)
|
||||
sys.path.insert(0, script_path)
|
||||
|
||||
@@ -27,12 +27,17 @@ def patch_args(args):
|
||||
return args
|
||||
|
||||
if is_python(args[0]):
|
||||
if '-c' == args[1]:
|
||||
try:
|
||||
indC = args.index('-c')
|
||||
except KeyError:
|
||||
indC = -1
|
||||
|
||||
if indC != -1:
|
||||
import pydevd
|
||||
host, port = pydevd.dispatch()
|
||||
|
||||
if port is not None:
|
||||
args[2] = "import sys; sys.path.append('%s'); import pydevd; pydevd.settrace(host='%s', port=%s, suspend=False); %s"%(helpers, host, port, args[2])
|
||||
args[indC + 1] = "import sys; sys.path.append('%s'); import pydevd; pydevd.settrace(host='%s', port=%s, suspend=False); %s"%(helpers, host, port, args[indC + 1])
|
||||
return args
|
||||
else:
|
||||
new_args.append(args[0])
|
||||
|
||||
Reference in New Issue
Block a user