Disable frame evaluation for remote debug server (PY-23587)

We do it in order to have ability to stop on the next line after the settrace() call
This commit is contained in:
Elizaveta Shashkova
2017-04-07 15:41:09 +03:00
parent be4d57af72
commit c7b59642c9
+9 -1
View File
@@ -76,6 +76,7 @@ connected = False
bufferStdOutToServer = False
bufferStdErrToServer = False
remote = False
inside_fork = False
file_system_encoding = getfilesystemencoding()
@@ -1171,7 +1172,7 @@ def _locked_settrace(
global bufferStdOutToServer
global bufferStdErrToServer
if not connected :
if not connected:
pydevd_vm_type.setup_type()
if SetupHolder.setup is None:
@@ -1219,6 +1220,11 @@ def _locked_settrace(
while not debugger.ready_to_run:
time.sleep(0.1) # busy wait until we receive run command
global inside_fork
if frame_eval_func is not None and not inside_fork:
# Disable frame evaluation for Remote Debug Server
debugger.frame_eval_func = None
# note that we do that through pydevd_tracing.SetTrace so that the tracing
# is not warned to the user!
pydevd_tracing.SetTrace(debugger.trace_dispatch, debugger.frame_eval_func)
@@ -1358,6 +1364,8 @@ def settrace_forked():
if port is not None:
global connected
connected = False
global inside_fork
inside_fork = True
custom_frames_container_init()