mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Handle userUnhandled exception breakpoints. Fixes #111
This commit is contained in:
parent
1fb970643b
commit
63c0faee41
15 changed files with 4184 additions and 3618 deletions
|
|
@ -686,6 +686,7 @@ class PyDevdAPI(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries,
|
||||
):
|
||||
|
|
@ -695,6 +696,7 @@ class PyDevdAPI(object):
|
|||
expression=expression,
|
||||
notify_on_handled_exceptions=notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions=notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions=notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only=notify_on_first_raise_only,
|
||||
ignore_libraries=ignore_libraries,
|
||||
)
|
||||
|
|
@ -723,6 +725,10 @@ class PyDevdAPI(object):
|
|||
cp = py_db.break_on_caught_exceptions.copy()
|
||||
cp.pop(exception, None)
|
||||
py_db.break_on_caught_exceptions = cp
|
||||
|
||||
cp = py_db.break_on_user_uncaught_exceptions.copy()
|
||||
cp.pop(exception, None)
|
||||
py_db.break_on_user_uncaught_exceptions = cp
|
||||
except:
|
||||
pydev_log.exception("Error while removing exception %s", sys.exc_info()[0])
|
||||
|
||||
|
|
@ -747,6 +753,7 @@ class PyDevdAPI(object):
|
|||
def remove_all_exception_breakpoints(self, py_db):
|
||||
py_db.break_on_uncaught_exceptions = {}
|
||||
py_db.break_on_caught_exceptions = {}
|
||||
py_db.break_on_user_uncaught_exceptions = {}
|
||||
|
||||
plugin = py_db.plugin
|
||||
if plugin is not None:
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class ExceptionBreakpoint(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries
|
||||
):
|
||||
|
|
@ -29,6 +30,7 @@ class ExceptionBreakpoint(object):
|
|||
self.notify_on_unhandled_exceptions = notify_on_unhandled_exceptions
|
||||
self.notify_on_handled_exceptions = notify_on_handled_exceptions
|
||||
self.notify_on_first_raise_only = notify_on_first_raise_only
|
||||
self.notify_on_user_unhandled_exceptions = notify_on_user_unhandled_exceptions
|
||||
self.ignore_libraries = ignore_libraries
|
||||
|
||||
self.type = exctype
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -280,7 +280,9 @@ cdef class PyDBFrame:
|
|||
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
||||
def should_stop_on_exception(self, frame, str event, arg):
|
||||
cdef PyDBAdditionalThreadInfo info;
|
||||
cdef bint flag;
|
||||
cdef bint should_stop;
|
||||
cdef bint was_just_raised;
|
||||
cdef list check_excs;
|
||||
# ELSE
|
||||
# def should_stop_on_exception(self, frame, event, arg):
|
||||
# ENDIF
|
||||
|
|
@ -308,55 +310,71 @@ cdef class PyDBFrame:
|
|||
pydev_log.exception()
|
||||
|
||||
if not should_stop:
|
||||
was_just_raised = trace.tb_next is None
|
||||
|
||||
# It was not handled by any plugin, lets check exception breakpoints.
|
||||
exception_breakpoint = main_debugger.get_exception_breakpoint(
|
||||
check_excs = []
|
||||
exc_break_caught = main_debugger.get_exception_breakpoint(
|
||||
exception, main_debugger.break_on_caught_exceptions)
|
||||
if exc_break_caught is not None:
|
||||
check_excs.append((exc_break_caught, False))
|
||||
|
||||
exc_break_user = main_debugger.get_exception_breakpoint(
|
||||
exception, main_debugger.break_on_user_uncaught_exceptions)
|
||||
if exc_break_user is not None:
|
||||
check_excs.append((exc_break_user, True))
|
||||
|
||||
for exc_break, is_user_uncaught in check_excs:
|
||||
# Initially mark that it should stop and then go into exclusions.
|
||||
should_stop = True
|
||||
|
||||
if exception_breakpoint is not None:
|
||||
if exception is SystemExit and main_debugger.ignore_system_exit_code(value):
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if exception in (GeneratorExit, StopIteration):
|
||||
elif exception in (GeneratorExit, StopIteration):
|
||||
# These exceptions are control-flow related (they work as a generator
|
||||
# pause), so, we shouldn't stop on them.
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if exception_breakpoint.condition is not None:
|
||||
eval_result = main_debugger.handle_breakpoint_condition(info, exception_breakpoint, frame)
|
||||
if not eval_result:
|
||||
return False, frame
|
||||
|
||||
if main_debugger.exclude_exception_by_filter(exception_breakpoint, trace):
|
||||
elif main_debugger.exclude_exception_by_filter(exc_break, trace):
|
||||
pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name))
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if ignore_exception_trace(trace):
|
||||
return False, frame
|
||||
elif ignore_exception_trace(trace):
|
||||
should_stop = False
|
||||
|
||||
was_just_raised = just_raised(trace)
|
||||
if was_just_raised:
|
||||
elif exc_break.condition is not None and \
|
||||
not main_debugger.handle_breakpoint_condition(info, exc_break, frame):
|
||||
should_stop = False
|
||||
|
||||
if main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
||||
return False, frame
|
||||
elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
||||
should_stop = False
|
||||
|
||||
if exception_breakpoint.notify_on_first_raise_only:
|
||||
if main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# In this case we never stop if it was just raised, so, to know if it was the first we
|
||||
# need to check if we're in the 2nd method.
|
||||
if not was_just_raised and not just_raised(trace.tb_next):
|
||||
return False, frame # I.e.: we stop only when we're at the caller of a method that throws an exception
|
||||
elif exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \
|
||||
and not was_just_raised and not just_raised(trace.tb_next):
|
||||
# In this case we never stop if it was just raised, so, to know if it was the first we
|
||||
# need to check if we're in the 2nd method.
|
||||
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
||||
|
||||
else:
|
||||
if not was_just_raised:
|
||||
return False, frame # I.e.: we stop only when it was just raised
|
||||
elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \
|
||||
and not was_just_raised:
|
||||
should_stop = False # I.e.: we stop only when it was just raised
|
||||
|
||||
# If it got here we should stop.
|
||||
should_stop = True
|
||||
try:
|
||||
info.pydev_message = exception_breakpoint.qname
|
||||
except:
|
||||
info.pydev_message = exception_breakpoint.qname.encode('utf-8')
|
||||
elif is_user_uncaught and not (
|
||||
not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True)
|
||||
and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True))):
|
||||
# User uncaught means that we're currently in user code but the code
|
||||
# up the stack is library code.
|
||||
should_stop = False
|
||||
|
||||
if should_stop:
|
||||
exception_breakpoint = exc_break
|
||||
try:
|
||||
info.pydev_message = exc_break.qname
|
||||
except:
|
||||
info.pydev_message = exc_break.qname.encode('utf-8')
|
||||
break
|
||||
|
||||
if should_stop:
|
||||
# Always add exception to frame (must remove later after we proceed).
|
||||
|
|
@ -582,7 +600,10 @@ cdef class PyDBFrame:
|
|||
return None if event == 'call' else NO_FTRACE
|
||||
|
||||
plugin_manager = main_debugger.plugin
|
||||
has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks
|
||||
has_exception_breakpoints = (
|
||||
main_debugger.break_on_caught_exceptions
|
||||
or main_debugger.break_on_user_uncaught_exceptions
|
||||
or main_debugger.has_plugin_exception_breaks)
|
||||
|
||||
stop_frame = info.pydev_step_stop
|
||||
step_cmd = info.pydev_step_cmd
|
||||
|
|
|
|||
|
|
@ -115,7 +115,9 @@ class PyDBFrame:
|
|||
# IFDEF CYTHON
|
||||
# def should_stop_on_exception(self, frame, str event, arg):
|
||||
# cdef PyDBAdditionalThreadInfo info;
|
||||
# cdef bint flag;
|
||||
# cdef bint should_stop;
|
||||
# cdef bint was_just_raised;
|
||||
# cdef list check_excs;
|
||||
# ELSE
|
||||
def should_stop_on_exception(self, frame, event, arg):
|
||||
# ENDIF
|
||||
|
|
@ -143,55 +145,71 @@ class PyDBFrame:
|
|||
pydev_log.exception()
|
||||
|
||||
if not should_stop:
|
||||
was_just_raised = trace.tb_next is None
|
||||
|
||||
# It was not handled by any plugin, lets check exception breakpoints.
|
||||
exception_breakpoint = main_debugger.get_exception_breakpoint(
|
||||
check_excs = []
|
||||
exc_break_caught = main_debugger.get_exception_breakpoint(
|
||||
exception, main_debugger.break_on_caught_exceptions)
|
||||
if exc_break_caught is not None:
|
||||
check_excs.append((exc_break_caught, False))
|
||||
|
||||
exc_break_user = main_debugger.get_exception_breakpoint(
|
||||
exception, main_debugger.break_on_user_uncaught_exceptions)
|
||||
if exc_break_user is not None:
|
||||
check_excs.append((exc_break_user, True))
|
||||
|
||||
for exc_break, is_user_uncaught in check_excs:
|
||||
# Initially mark that it should stop and then go into exclusions.
|
||||
should_stop = True
|
||||
|
||||
if exception_breakpoint is not None:
|
||||
if exception is SystemExit and main_debugger.ignore_system_exit_code(value):
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if exception in (GeneratorExit, StopIteration):
|
||||
elif exception in (GeneratorExit, StopIteration):
|
||||
# These exceptions are control-flow related (they work as a generator
|
||||
# pause), so, we shouldn't stop on them.
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if exception_breakpoint.condition is not None:
|
||||
eval_result = main_debugger.handle_breakpoint_condition(info, exception_breakpoint, frame)
|
||||
if not eval_result:
|
||||
return False, frame
|
||||
|
||||
if main_debugger.exclude_exception_by_filter(exception_breakpoint, trace):
|
||||
elif main_debugger.exclude_exception_by_filter(exc_break, trace):
|
||||
pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name))
|
||||
return False, frame
|
||||
should_stop = False
|
||||
|
||||
if ignore_exception_trace(trace):
|
||||
return False, frame
|
||||
elif ignore_exception_trace(trace):
|
||||
should_stop = False
|
||||
|
||||
was_just_raised = just_raised(trace)
|
||||
if was_just_raised:
|
||||
elif exc_break.condition is not None and \
|
||||
not main_debugger.handle_breakpoint_condition(info, exc_break, frame):
|
||||
should_stop = False
|
||||
|
||||
if main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
||||
return False, frame
|
||||
elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
||||
should_stop = False
|
||||
|
||||
if exception_breakpoint.notify_on_first_raise_only:
|
||||
if main_debugger.skip_on_exceptions_thrown_in_same_context:
|
||||
# In this case we never stop if it was just raised, so, to know if it was the first we
|
||||
# need to check if we're in the 2nd method.
|
||||
if not was_just_raised and not just_raised(trace.tb_next):
|
||||
return False, frame # I.e.: we stop only when we're at the caller of a method that throws an exception
|
||||
elif exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \
|
||||
and not was_just_raised and not just_raised(trace.tb_next):
|
||||
# In this case we never stop if it was just raised, so, to know if it was the first we
|
||||
# need to check if we're in the 2nd method.
|
||||
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
||||
|
||||
else:
|
||||
if not was_just_raised:
|
||||
return False, frame # I.e.: we stop only when it was just raised
|
||||
elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \
|
||||
and not was_just_raised:
|
||||
should_stop = False # I.e.: we stop only when it was just raised
|
||||
|
||||
# If it got here we should stop.
|
||||
should_stop = True
|
||||
try:
|
||||
info.pydev_message = exception_breakpoint.qname
|
||||
except:
|
||||
info.pydev_message = exception_breakpoint.qname.encode('utf-8')
|
||||
elif is_user_uncaught and not (
|
||||
not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True)
|
||||
and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True))):
|
||||
# User uncaught means that we're currently in user code but the code
|
||||
# up the stack is library code.
|
||||
should_stop = False
|
||||
|
||||
if should_stop:
|
||||
exception_breakpoint = exc_break
|
||||
try:
|
||||
info.pydev_message = exc_break.qname
|
||||
except:
|
||||
info.pydev_message = exc_break.qname.encode('utf-8')
|
||||
break
|
||||
|
||||
if should_stop:
|
||||
# Always add exception to frame (must remove later after we proceed).
|
||||
|
|
@ -417,7 +435,10 @@ class PyDBFrame:
|
|||
return None if event == 'call' else NO_FTRACE
|
||||
|
||||
plugin_manager = main_debugger.plugin
|
||||
has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks
|
||||
has_exception_breakpoints = (
|
||||
main_debugger.break_on_caught_exceptions
|
||||
or main_debugger.break_on_user_uncaught_exceptions
|
||||
or main_debugger.has_plugin_exception_breaks)
|
||||
|
||||
stop_frame = info.pydev_step_stop
|
||||
step_cmd = info.pydev_step_cmd
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class NetCommandFactoryJson(NetCommandFactory):
|
|||
# Create a source-reference to be used where we provide the source by decompiling the code.
|
||||
# Note: When the time comes to retrieve the source reference in this case, we'll
|
||||
# check the linecache first (see: get_decompiled_source_from_frame_id).
|
||||
source_reference = pydevd_file_utils.create_source_reference_for_frame_id(frame_id)
|
||||
source_reference = pydevd_file_utils.create_source_reference_for_frame_id(frame_id, original_filename)
|
||||
else:
|
||||
# Check if someone added a source reference to the linecache (Python attrs does this).
|
||||
if linecache.getline(original_filename, 1):
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ class _PyDevCommandProcessor(object):
|
|||
splitted = text.split(';')
|
||||
py_db.break_on_uncaught_exceptions = {}
|
||||
py_db.break_on_caught_exceptions = {}
|
||||
py_db.break_on_user_uncaught_exceptions = {}
|
||||
if len(splitted) >= 5:
|
||||
if splitted[0] == 'true':
|
||||
break_on_uncaught = True
|
||||
|
|
@ -382,6 +383,7 @@ class _PyDevCommandProcessor(object):
|
|||
expression=None,
|
||||
notify_on_handled_exceptions=break_on_caught,
|
||||
notify_on_unhandled_exceptions=break_on_uncaught,
|
||||
notify_on_user_unhandled_exceptions=False, # TODO (not currently supported in this API).
|
||||
notify_on_first_raise_only=True,
|
||||
ignore_libraries=ignore_libraries,
|
||||
)
|
||||
|
|
@ -480,6 +482,7 @@ class _PyDevCommandProcessor(object):
|
|||
py_db, exception, condition, expression,
|
||||
notify_on_handled_exceptions=int(notify_on_handled_exceptions) > 0,
|
||||
notify_on_unhandled_exceptions=int(notify_on_unhandled_exceptions) == 1,
|
||||
notify_on_user_unhandled_exceptions=0, # TODO (not currently supported in this API).
|
||||
notify_on_first_raise_only=int(notify_on_handled_exceptions) == 2,
|
||||
ignore_libraries=int(ignore_libraries) > 0,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -683,7 +683,8 @@ class PyDevJsonCommandProcessor(object):
|
|||
# userUnhandled: breaks if the exception is not handled by user code
|
||||
|
||||
notify_on_handled_exceptions = 1 if option.breakMode == 'always' else 0
|
||||
notify_on_unhandled_exceptions = 1 if option.breakMode in ('unhandled', 'userUnhandled') else 0
|
||||
notify_on_unhandled_exceptions = 1 if option.breakMode == 'unhandled' else 0
|
||||
notify_on_user_unhandled_exceptions = 1 if option.breakMode == 'userUnhandled' else 0
|
||||
exception_paths = option.path
|
||||
break_raised |= notify_on_handled_exceptions
|
||||
break_uncaught |= notify_on_unhandled_exceptions
|
||||
|
|
@ -711,6 +712,7 @@ class PyDevJsonCommandProcessor(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries
|
||||
)
|
||||
|
|
@ -718,9 +720,11 @@ class PyDevJsonCommandProcessor(object):
|
|||
else:
|
||||
break_raised = 'raised' in filters
|
||||
break_uncaught = 'uncaught' in filters
|
||||
if break_raised or break_uncaught:
|
||||
break_user = 'userUnhandled' in filters
|
||||
if break_raised or break_uncaught or break_user:
|
||||
notify_on_handled_exceptions = 1 if break_raised else 0
|
||||
notify_on_unhandled_exceptions = 1 if break_uncaught else 0
|
||||
notify_on_user_unhandled_exceptions = 1 if break_user else 0
|
||||
exception = 'BaseException'
|
||||
|
||||
self.api.add_python_exception_breakpoint(
|
||||
|
|
@ -730,6 +734,7 @@ class PyDevJsonCommandProcessor(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1511,6 +1511,7 @@ static const char __pyx_k_pydevd_frame_eval_pydevd_modify[] = "_pydevd_frame_eva
|
|||
static const char __pyx_k_set_additional_thread_info_lock[] = "_set_additional_thread_info_lock";
|
||||
static const char __pyx_k_Incompatible_checksums_s_vs_0x2c[] = "Incompatible checksums (%s vs 0x2ccfa67 = (additional_info, fully_initialized, inside_frame_eval, is_pydevd_thread, thread_trace_func))";
|
||||
static const char __pyx_k_Incompatible_checksums_s_vs_0xe2[] = "Incompatible checksums (%s vs 0xe2c2285 = (always_skip_code, breakpoint_found, breakpoints_mtime, co_filename, new_code, real_path))";
|
||||
static const char __pyx_k_break_on_user_uncaught_exception[] = "break_on_user_uncaught_exceptions";
|
||||
static const char __pyx_k_fix_top_level_trace_and_get_trac[] = "fix_top_level_trace_and_get_trace_func";
|
||||
static const char __pyx_k_pydevd_frame_eval_pydevd_frame_2[] = "_pydevd_frame_eval/pydevd_frame_evaluator.pyx";
|
||||
static const char __pyx_k_pydevd_frame_eval_pydevd_frame_3[] = "_pydevd_frame_eval.pydevd_frame_evaluator";
|
||||
|
|
@ -1527,6 +1528,7 @@ static PyObject *__pyx_n_s_active;
|
|||
static PyObject *__pyx_n_s_additional_info;
|
||||
static PyObject *__pyx_n_s_arg;
|
||||
static PyObject *__pyx_n_s_break_on_caught_exceptions;
|
||||
static PyObject *__pyx_n_s_break_on_user_uncaught_exception;
|
||||
static PyObject *__pyx_n_s_breakpoints;
|
||||
static PyObject *__pyx_n_s_call;
|
||||
static PyObject *__pyx_n_s_can_skip;
|
||||
|
|
@ -6882,7 +6884,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*
|
||||
* if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_caught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
*/
|
||||
__pyx_t_11 = __pyx_v_additional_info->pydev_step_cmd;
|
||||
__pyx_t_4 = ((__pyx_t_11 == __pyx_v_CMD_STEP_INTO) != 0);
|
||||
|
|
@ -6911,8 +6913,8 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*
|
||||
* if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \
|
||||
* main_debugger.break_on_caught_exceptions or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.signature_factory or \
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
|
|
@ -6927,11 +6929,11 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":314
|
||||
* if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \
|
||||
* main_debugger.break_on_caught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.signature_factory or \
|
||||
* additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop:
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_user_uncaught_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 314, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
|
@ -6943,12 +6945,12 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":315
|
||||
* main_debugger.break_on_caught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.signature_factory or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.signature_factory or \
|
||||
* additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop:
|
||||
*
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 315, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
|
@ -6959,6 +6961,23 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":316
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.signature_factory or \ # <<<<<<<<<<<<<<
|
||||
* additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop:
|
||||
*
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 316, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (!__pyx_t_4) {
|
||||
} else {
|
||||
__pyx_t_3 = __pyx_t_4;
|
||||
goto __pyx_L31_bool_binop_done;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":317
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.signature_factory or \
|
||||
* additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop: # <<<<<<<<<<<<<<
|
||||
|
|
@ -6970,27 +6989,27 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
if (!__pyx_t_1) {
|
||||
} else {
|
||||
__pyx_t_4 = __pyx_t_1;
|
||||
goto __pyx_L40_bool_binop_done;
|
||||
goto __pyx_L41_bool_binop_done;
|
||||
}
|
||||
__pyx_t_1 = ((__pyx_t_11 == __pyx_v_CMD_STEP_OVER_MY_CODE) != 0);
|
||||
__pyx_t_4 = __pyx_t_1;
|
||||
__pyx_L40_bool_binop_done:;
|
||||
__pyx_L41_bool_binop_done:;
|
||||
__pyx_t_1 = (__pyx_t_4 != 0);
|
||||
if (__pyx_t_1) {
|
||||
} else {
|
||||
__pyx_t_3 = __pyx_t_1;
|
||||
goto __pyx_L31_bool_binop_done;
|
||||
}
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 316, __pyx_L23_error)
|
||||
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 317, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (__pyx_t_1) {
|
||||
} else {
|
||||
__pyx_t_3 = __pyx_t_1;
|
||||
goto __pyx_L31_bool_binop_done;
|
||||
}
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_1 = (__pyx_t_2 == __pyx_v_additional_info->pydev_step_stop);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
|
@ -7003,11 +7022,11 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*
|
||||
* if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_caught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
*/
|
||||
if (__pyx_t_3) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":320
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":321
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval enabled trace')
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7018,7 +7037,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_4 = (__pyx_t_3 != 0);
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":321
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":322
|
||||
* # print('get_bytecode_while_frame_eval enabled trace')
|
||||
* if thread_info.thread_trace_func is not None:
|
||||
* frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<<
|
||||
|
|
@ -7027,20 +7046,20 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_t_2 = __pyx_v_thread_info->thread_trace_func;
|
||||
__Pyx_INCREF(__pyx_t_2);
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_2) < 0) __PYX_ERR(0, 321, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_2) < 0) __PYX_ERR(0, 322, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":320
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":321
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval enabled trace')
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
*/
|
||||
goto __pyx_L43;
|
||||
goto __pyx_L44;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":323
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":324
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch # <<<<<<<<<<<<<<
|
||||
|
|
@ -7048,27 +7067,27 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
* func_code_info: FuncCodeInfo = get_func_code_info(frame_obj, frame_obj.f_code)
|
||||
*/
|
||||
/*else*/ {
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_10 = __pyx_t_2;
|
||||
__Pyx_INCREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 323, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 324, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
}
|
||||
__pyx_L43:;
|
||||
__pyx_L44:;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":312
|
||||
* thread_info.thread_trace_func = trace_func
|
||||
*
|
||||
* if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \ # <<<<<<<<<<<<<<
|
||||
* main_debugger.break_on_caught_exceptions or \
|
||||
* main_debugger.has_plugin_exception_breaks or \
|
||||
* main_debugger.break_on_user_uncaught_exceptions or \
|
||||
*/
|
||||
goto __pyx_L30;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":325
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":326
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch
|
||||
* else:
|
||||
* func_code_info: FuncCodeInfo = get_func_code_info(frame_obj, frame_obj.f_code) # <<<<<<<<<<<<<<
|
||||
|
|
@ -7076,12 +7095,12 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
* # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code)
|
||||
*/
|
||||
/*else*/ {
|
||||
__pyx_t_10 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(__pyx_v_frame_obj, __pyx_v_frame_obj->f_code)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 325, __pyx_L23_error)
|
||||
__pyx_t_10 = ((PyObject *)__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_func_code_info(__pyx_v_frame_obj, __pyx_v_frame_obj->f_code)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 326, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__pyx_v_func_code_info = ((struct __pyx_obj_18_pydevd_frame_eval_22pydevd_frame_evaluator_FuncCodeInfo *)__pyx_t_10);
|
||||
__pyx_t_10 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":328
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code)
|
||||
* if not func_code_info.always_skip_code: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7091,40 +7110,40 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_4 = ((!(__pyx_v_func_code_info->always_skip_code != 0)) != 0);
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":330
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":331
|
||||
* if not func_code_info.always_skip_code:
|
||||
*
|
||||
* if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<<
|
||||
* can_skip = main_debugger.plugin.can_skip(main_debugger, <object> frame_obj)
|
||||
*
|
||||
*/
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 330, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 330, __pyx_L23_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (!__pyx_t_3) {
|
||||
} else {
|
||||
__pyx_t_4 = __pyx_t_3;
|
||||
goto __pyx_L46_bool_binop_done;
|
||||
goto __pyx_L47_bool_binop_done;
|
||||
}
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 330, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 330, __pyx_L23_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_t_4 = __pyx_t_3;
|
||||
__pyx_L46_bool_binop_done:;
|
||||
__pyx_L47_bool_binop_done:;
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":331
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":332
|
||||
*
|
||||
* if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks:
|
||||
* can_skip = main_debugger.plugin.can_skip(main_debugger, <object> frame_obj) # <<<<<<<<<<<<<<
|
||||
*
|
||||
* if not can_skip:
|
||||
*/
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_can_skip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__pyx_t_2 = NULL;
|
||||
|
|
@ -7142,7 +7161,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
#if CYTHON_FAST_PYCALL
|
||||
if (PyFunction_Check(__pyx_t_9)) {
|
||||
PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_main_debugger, ((PyObject *)__pyx_v_frame_obj)};
|
||||
__pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
} else
|
||||
|
|
@ -7150,13 +7169,13 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
#if CYTHON_FAST_PYCCALL
|
||||
if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
|
||||
PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_main_debugger, ((PyObject *)__pyx_v_frame_obj)};
|
||||
__pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_8 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_8);
|
||||
if (__pyx_t_2) {
|
||||
__Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
|
||||
|
|
@ -7167,16 +7186,16 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__Pyx_INCREF(((PyObject *)__pyx_v_frame_obj));
|
||||
__Pyx_GIVEREF(((PyObject *)__pyx_v_frame_obj));
|
||||
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_11, ((PyObject *)__pyx_v_frame_obj));
|
||||
__pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
||||
}
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L23_error)
|
||||
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
__pyx_v_can_skip = __pyx_t_4;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":333
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":334
|
||||
* can_skip = main_debugger.plugin.can_skip(main_debugger, <object> frame_obj)
|
||||
*
|
||||
* if not can_skip: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7186,7 +7205,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_4 = ((!(__pyx_v_can_skip != 0)) != 0);
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":336
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":337
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval not can_skip')
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7197,7 +7216,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_3 = (__pyx_t_4 != 0);
|
||||
if (__pyx_t_3) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":337
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":338
|
||||
* # print('get_bytecode_while_frame_eval not can_skip')
|
||||
* if thread_info.thread_trace_func is not None:
|
||||
* frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<<
|
||||
|
|
@ -7206,20 +7225,20 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_t_10 = __pyx_v_thread_info->thread_trace_func;
|
||||
__Pyx_INCREF(__pyx_t_10);
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 337, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 338, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":336
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":337
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval not can_skip')
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
*/
|
||||
goto __pyx_L49;
|
||||
goto __pyx_L50;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":339
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":340
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch # <<<<<<<<<<<<<<
|
||||
|
|
@ -7227,17 +7246,17 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
* if can_skip and func_code_info.breakpoint_found:
|
||||
*/
|
||||
/*else*/ {
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L23_error)
|
||||
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__pyx_t_9 = __pyx_t_10;
|
||||
__Pyx_INCREF(__pyx_t_9);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_9) < 0) __PYX_ERR(0, 339, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_9) < 0) __PYX_ERR(0, 340, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
}
|
||||
__pyx_L49:;
|
||||
__pyx_L50:;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":333
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":334
|
||||
* can_skip = main_debugger.plugin.can_skip(main_debugger, <object> frame_obj)
|
||||
*
|
||||
* if not can_skip: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7246,7 +7265,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":330
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":331
|
||||
* if not func_code_info.always_skip_code:
|
||||
*
|
||||
* if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7255,7 +7274,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":341
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":342
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch
|
||||
*
|
||||
* if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7266,14 +7285,14 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
if (__pyx_t_4) {
|
||||
} else {
|
||||
__pyx_t_3 = __pyx_t_4;
|
||||
goto __pyx_L51_bool_binop_done;
|
||||
goto __pyx_L52_bool_binop_done;
|
||||
}
|
||||
__pyx_t_4 = (__pyx_v_func_code_info->breakpoint_found != 0);
|
||||
__pyx_t_3 = __pyx_t_4;
|
||||
__pyx_L51_bool_binop_done:;
|
||||
__pyx_L52_bool_binop_done:;
|
||||
if (__pyx_t_3) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":348
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":349
|
||||
* # this means we weren't able to actually add the code
|
||||
* # where needed, so, fallback to tracing.
|
||||
* if func_code_info.new_code is None: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7284,7 +7303,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_4 = (__pyx_t_3 != 0);
|
||||
if (__pyx_t_4) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":349
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":350
|
||||
* # where needed, so, fallback to tracing.
|
||||
* if func_code_info.new_code is None:
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7295,7 +7314,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_3 = (__pyx_t_4 != 0);
|
||||
if (__pyx_t_3) {
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":350
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":351
|
||||
* if func_code_info.new_code is None:
|
||||
* if thread_info.thread_trace_func is not None:
|
||||
* frame.f_trace = thread_info.thread_trace_func # <<<<<<<<<<<<<<
|
||||
|
|
@ -7304,20 +7323,20 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_t_9 = __pyx_v_thread_info->thread_trace_func;
|
||||
__Pyx_INCREF(__pyx_t_9);
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_9) < 0) __PYX_ERR(0, 350, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_9) < 0) __PYX_ERR(0, 351, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":349
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":350
|
||||
* # where needed, so, fallback to tracing.
|
||||
* if func_code_info.new_code is None:
|
||||
* if thread_info.thread_trace_func is not None: # <<<<<<<<<<<<<<
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
*/
|
||||
goto __pyx_L54;
|
||||
goto __pyx_L55;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":352
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":353
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
* else:
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch # <<<<<<<<<<<<<<
|
||||
|
|
@ -7325,27 +7344,27 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
* # print('Using frame eval break for', <object> frame_obj.f_code.co_name)
|
||||
*/
|
||||
/*else*/ {
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 352, __pyx_L23_error)
|
||||
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_10 = __pyx_t_9;
|
||||
__Pyx_INCREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 352, __pyx_L23_error)
|
||||
if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_10) < 0) __PYX_ERR(0, 353, __pyx_L23_error)
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
}
|
||||
__pyx_L54:;
|
||||
__pyx_L55:;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":348
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":349
|
||||
* # this means we weren't able to actually add the code
|
||||
* # where needed, so, fallback to tracing.
|
||||
* if func_code_info.new_code is None: # <<<<<<<<<<<<<<
|
||||
* if thread_info.thread_trace_func is not None:
|
||||
* frame.f_trace = thread_info.thread_trace_func
|
||||
*/
|
||||
goto __pyx_L53;
|
||||
goto __pyx_L54;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":355
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":356
|
||||
* else:
|
||||
* # print('Using frame eval break for', <object> frame_obj.f_code.co_name)
|
||||
* update_globals_dict(<object> frame_obj.f_globals) # <<<<<<<<<<<<<<
|
||||
|
|
@ -7353,7 +7372,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
* old = <object> frame_obj.f_code
|
||||
*/
|
||||
/*else*/ {
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 355, __pyx_L23_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_update_globals_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 356, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_9);
|
||||
__pyx_t_8 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
|
||||
|
|
@ -7367,12 +7386,12 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
}
|
||||
__pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, ((PyObject *)__pyx_v_frame_obj->f_globals)) : __Pyx_PyObject_CallOneArg(__pyx_t_9, ((PyObject *)__pyx_v_frame_obj->f_globals));
|
||||
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
|
||||
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 355, __pyx_L23_error)
|
||||
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 356, __pyx_L23_error)
|
||||
__Pyx_GOTREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":356
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":357
|
||||
* # print('Using frame eval break for', <object> frame_obj.f_code.co_name)
|
||||
* update_globals_dict(<object> frame_obj.f_globals)
|
||||
* Py_INCREF(func_code_info.new_code) # <<<<<<<<<<<<<<
|
||||
|
|
@ -7384,7 +7403,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
Py_INCREF(__pyx_t_10);
|
||||
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":357
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":358
|
||||
* update_globals_dict(<object> frame_obj.f_globals)
|
||||
* Py_INCREF(func_code_info.new_code)
|
||||
* old = <object> frame_obj.f_code # <<<<<<<<<<<<<<
|
||||
|
|
@ -7396,7 +7415,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_v_old = __pyx_t_10;
|
||||
__pyx_t_10 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":358
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":359
|
||||
* Py_INCREF(func_code_info.new_code)
|
||||
* old = <object> frame_obj.f_code
|
||||
* frame_obj.f_code = <PyCodeObject *> func_code_info.new_code # <<<<<<<<<<<<<<
|
||||
|
|
@ -7405,7 +7424,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_v_frame_obj->f_code = ((PyCodeObject *)__pyx_v_func_code_info->new_code);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":359
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":360
|
||||
* old = <object> frame_obj.f_code
|
||||
* frame_obj.f_code = <PyCodeObject *> func_code_info.new_code
|
||||
* Py_DECREF(old) # <<<<<<<<<<<<<<
|
||||
|
|
@ -7414,9 +7433,9 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
Py_DECREF(__pyx_v_old);
|
||||
}
|
||||
__pyx_L53:;
|
||||
__pyx_L54:;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":341
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":342
|
||||
* frame.f_trace = <object> main_debugger.trace_dispatch
|
||||
*
|
||||
* if can_skip and func_code_info.breakpoint_found: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7425,7 +7444,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":328
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":329
|
||||
* # if DEBUG:
|
||||
* # print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code)
|
||||
* if not func_code_info.always_skip_code: # <<<<<<<<<<<<<<
|
||||
|
|
@ -7437,7 +7456,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_L30:;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":362
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
*
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<<
|
||||
|
|
@ -7448,7 +7467,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
/*normal exit:*/{
|
||||
__pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":364
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1
|
||||
* additional_info.is_tracing = False # <<<<<<<<<<<<<<
|
||||
|
|
@ -7478,7 +7497,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_t_11 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
|
||||
{
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":362
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
*
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<<
|
||||
|
|
@ -7487,7 +7506,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":364
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1
|
||||
* additional_info.is_tracing = False # <<<<<<<<<<<<<<
|
||||
|
|
@ -7513,7 +7532,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_L22_return: {
|
||||
__pyx_t_18 = __pyx_r;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":362
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
*
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1 # <<<<<<<<<<<<<<
|
||||
|
|
@ -7522,7 +7541,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
*/
|
||||
__pyx_v_thread_info->inside_frame_eval = (__pyx_v_thread_info->inside_frame_eval - 1);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":363
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":364
|
||||
* finally:
|
||||
* thread_info.inside_frame_eval -= 1
|
||||
* additional_info.is_tracing = False # <<<<<<<<<<<<<<
|
||||
|
|
@ -7536,7 +7555,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
__pyx_L24:;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":365
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":366
|
||||
* additional_info.is_tracing = False
|
||||
*
|
||||
* return _PyEval_EvalFrameDefault(frame_obj, exc) # <<<<<<<<<<<<<<
|
||||
|
|
@ -7575,7 +7594,7 @@ static PyObject *__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytec
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":369
|
||||
*
|
||||
*
|
||||
* def frame_eval_func(): # <<<<<<<<<<<<<<
|
||||
|
|
@ -7610,7 +7629,7 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10frame_
|
|||
int __pyx_clineno = 0;
|
||||
__Pyx_RefNannySetupContext("frame_eval_func", 0);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":369
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":370
|
||||
*
|
||||
* def frame_eval_func():
|
||||
* cdef PyThreadState *state = PyThreadState_Get() # <<<<<<<<<<<<<<
|
||||
|
|
@ -7619,7 +7638,7 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10frame_
|
|||
*/
|
||||
__pyx_v_state = PyThreadState_Get();
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":370
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":371
|
||||
* def frame_eval_func():
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = get_bytecode_while_frame_eval # <<<<<<<<<<<<<<
|
||||
|
|
@ -7628,19 +7647,19 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10frame_
|
|||
*/
|
||||
__pyx_v_state->interp->eval_frame = __pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":372
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":373
|
||||
* state.interp.eval_frame = get_bytecode_while_frame_eval
|
||||
* global dummy_tracing_holder
|
||||
* dummy_tracing_holder.set_trace_func(dummy_trace_dispatch) # <<<<<<<<<<<<<<
|
||||
*
|
||||
*
|
||||
*/
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_tracing_holder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_tracing_holder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set_trace_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
|
||||
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set_trace_func); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_3);
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
|
||||
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dummy_trace_dispatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
__pyx_t_4 = NULL;
|
||||
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
|
||||
|
|
@ -7655,12 +7674,12 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10frame_
|
|||
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
|
||||
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
|
||||
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_1);
|
||||
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
||||
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":369
|
||||
*
|
||||
*
|
||||
* def frame_eval_func(): # <<<<<<<<<<<<<<
|
||||
|
|
@ -7684,7 +7703,7 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_10frame_
|
|||
return __pyx_r;
|
||||
}
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":375
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376
|
||||
*
|
||||
*
|
||||
* def stop_frame_eval(): # <<<<<<<<<<<<<<
|
||||
|
|
@ -7712,7 +7731,7 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12stop_f
|
|||
__Pyx_RefNannyDeclarations
|
||||
__Pyx_RefNannySetupContext("stop_frame_eval", 0);
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":377
|
||||
*
|
||||
* def stop_frame_eval():
|
||||
* cdef PyThreadState *state = PyThreadState_Get() # <<<<<<<<<<<<<<
|
||||
|
|
@ -7720,14 +7739,14 @@ static PyObject *__pyx_pf_18_pydevd_frame_eval_22pydevd_frame_evaluator_12stop_f
|
|||
*/
|
||||
__pyx_v_state = PyThreadState_Get();
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":377
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":378
|
||||
* def stop_frame_eval():
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = _PyEval_EvalFrameDefault # <<<<<<<<<<<<<<
|
||||
*/
|
||||
__pyx_v_state->interp->eval_frame = _PyEval_EvalFrameDefault;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":375
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376
|
||||
*
|
||||
*
|
||||
* def stop_frame_eval(): # <<<<<<<<<<<<<<
|
||||
|
|
@ -9091,6 +9110,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|||
{&__pyx_n_s_additional_info, __pyx_k_additional_info, sizeof(__pyx_k_additional_info), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_break_on_caught_exceptions, __pyx_k_break_on_caught_exceptions, sizeof(__pyx_k_break_on_caught_exceptions), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_break_on_user_uncaught_exception, __pyx_k_break_on_user_uncaught_exception, sizeof(__pyx_k_break_on_user_uncaught_exception), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_breakpoints, __pyx_k_breakpoints, sizeof(__pyx_k_breakpoints), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_can_skip, __pyx_k_can_skip, sizeof(__pyx_k_can_skip), 0, 0, 1, 1},
|
||||
|
|
@ -9250,29 +9270,29 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|||
__Pyx_GIVEREF(__pyx_tuple__9);
|
||||
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_get_func_code_info_py, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 143, __pyx_L1_error)
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":369
|
||||
*
|
||||
*
|
||||
* def frame_eval_func(): # <<<<<<<<<<<<<<
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = get_bytecode_while_frame_eval
|
||||
*/
|
||||
__pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 368, __pyx_L1_error)
|
||||
__pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 369, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__11);
|
||||
__Pyx_GIVEREF(__pyx_tuple__11);
|
||||
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_frame_eval_func, 368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 368, __pyx_L1_error)
|
||||
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_frame_eval_func, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 369, __pyx_L1_error)
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":375
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376
|
||||
*
|
||||
*
|
||||
* def stop_frame_eval(): # <<<<<<<<<<<<<<
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = _PyEval_EvalFrameDefault
|
||||
*/
|
||||
__pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 375, __pyx_L1_error)
|
||||
__pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 376, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__13);
|
||||
__Pyx_GIVEREF(__pyx_tuple__13);
|
||||
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_stop_frame_eval, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 375, __pyx_L1_error)
|
||||
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pydevd_frame_eval_pydevd_frame_2, __pyx_n_s_stop_frame_eval, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 376, __pyx_L1_error)
|
||||
|
||||
/* "(tree fragment)":1
|
||||
* def __pyx_unpickle_ThreadInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
||||
|
|
@ -9883,28 +9903,28 @@ if (!__Pyx_RefNanny) {
|
|||
*/
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_code_extra_index, __pyx_int_neg_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":368
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":369
|
||||
*
|
||||
*
|
||||
* def frame_eval_func(): # <<<<<<<<<<<<<<
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = get_bytecode_while_frame_eval
|
||||
*/
|
||||
__pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11frame_eval_func, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
|
||||
__pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_11frame_eval_func, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_frame_eval_func, __pyx_t_2) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_frame_eval_func, __pyx_t_2) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":375
|
||||
/* "_pydevd_frame_eval/pydevd_frame_evaluator.pyx":376
|
||||
*
|
||||
*
|
||||
* def stop_frame_eval(): # <<<<<<<<<<<<<<
|
||||
* cdef PyThreadState *state = PyThreadState_Get()
|
||||
* state.interp.eval_frame = _PyEval_EvalFrameDefault
|
||||
*/
|
||||
__pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13stop_frame_eval, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
|
||||
__pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_18_pydevd_frame_eval_22pydevd_frame_evaluator_13stop_frame_eval, NULL, __pyx_n_s_pydevd_frame_eval_pydevd_frame_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_t_2);
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_stop_frame_eval, __pyx_t_2) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
|
||||
if (PyDict_SetItem(__pyx_d, __pyx_n_s_stop_frame_eval, __pyx_t_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
|
||||
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
||||
|
||||
/* "(tree fragment)":1
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ cdef class ThreadInfo:
|
|||
self.inside_frame_eval = 0
|
||||
self.fully_initialized = False
|
||||
self.thread_trace_func = None
|
||||
|
||||
|
||||
def initialize_if_possible(self):
|
||||
# Don't call threading.currentThread because if we're too early in the process
|
||||
# we may create a dummy thread.
|
||||
|
|
@ -73,7 +73,7 @@ cdef class FuncCodeInfo:
|
|||
cdef bint always_skip_code
|
||||
cdef public bint breakpoint_found
|
||||
cdef public object new_code
|
||||
|
||||
|
||||
# When breakpoints_mtime != PyDb.mtime the validity of breakpoints have
|
||||
# to be re-evaluated (if invalid a new FuncCodeInfo must be created and
|
||||
# tracing can't be disabled for the related frames).
|
||||
|
|
@ -121,11 +121,11 @@ cdef ThreadInfo get_thread_info():
|
|||
_thread_local_info.thread_info = thread_info
|
||||
|
||||
# Note: _code_extra_index is not actually thread-related,
|
||||
# but this is a good point to initialize it.
|
||||
# but this is a good point to initialize it.
|
||||
global _code_extra_index
|
||||
if _code_extra_index == -1:
|
||||
_code_extra_index = _PyEval_RequestCodeExtraIndex(release_co_extra)
|
||||
|
||||
|
||||
thread_info.initialize_if_possible()
|
||||
finally:
|
||||
thread_info.inside_frame_eval -= 1
|
||||
|
|
@ -165,7 +165,7 @@ cdef FuncCodeInfo get_func_code_info(PyFrameObject * frame_obj, PyCodeObject * c
|
|||
# print('get_func_code_info', f_code.co_name, f_code.co_filename)
|
||||
|
||||
cdef object main_debugger = GlobalDebuggerHolder.global_dbg
|
||||
|
||||
|
||||
cdef PyObject * extra
|
||||
_PyCode_GetExtra(<PyObject *> code_obj, _code_extra_index, & extra)
|
||||
if extra is not NULL:
|
||||
|
|
@ -196,7 +196,7 @@ cdef FuncCodeInfo get_func_code_info(PyFrameObject * frame_obj, PyCodeObject * c
|
|||
abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_file(co_filename)
|
||||
|
||||
func_code_info.real_path = abs_path_real_path_and_base[1]
|
||||
|
||||
|
||||
cache_file_type = main_debugger.get_cache_file_type()
|
||||
# Note: this cache key must be the same from PyDB.get_file_type() -- see it for comments
|
||||
# on the cache.
|
||||
|
|
@ -230,18 +230,18 @@ cdef FuncCodeInfo get_func_code_info(PyFrameObject * frame_obj, PyCodeObject * c
|
|||
# print('created breakpoint', code_obj_py.co_name, line)
|
||||
func_code_info.breakpoint_found = True
|
||||
break_at_lines.add(line)
|
||||
|
||||
|
||||
success, new_code = insert_code(
|
||||
code_obj_py, create_pydev_trace_code_wrapper(line), line, tuple(break_at_lines))
|
||||
code_obj_py = new_code
|
||||
|
||||
|
||||
if not success:
|
||||
func_code_info.new_code = None
|
||||
break
|
||||
else:
|
||||
# Ok, all succeeded, set to generated code object.
|
||||
func_code_info.new_code = new_code
|
||||
|
||||
|
||||
|
||||
Py_INCREF(func_code_info)
|
||||
_PyCode_SetExtra(<PyObject *> code_obj, _code_extra_index, <PyObject *> func_code_info)
|
||||
|
|
@ -279,13 +279,13 @@ cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc
|
|||
|
||||
if thread_info.inside_frame_eval:
|
||||
return _PyEval_EvalFrameDefault(frame_obj, exc)
|
||||
|
||||
|
||||
if not thread_info.fully_initialized:
|
||||
thread_info.initialize_if_possible()
|
||||
if not thread_info.fully_initialized:
|
||||
return _PyEval_EvalFrameDefault(frame_obj, exc)
|
||||
|
||||
# Can only get additional_info when fully initialized.
|
||||
# Can only get additional_info when fully initialized.
|
||||
cdef PyDBAdditionalThreadInfo additional_info = thread_info.additional_info
|
||||
if thread_info.is_pydevd_thread or additional_info.is_tracing:
|
||||
# Make sure that we don't trace pydevd threads or inside our own calls.
|
||||
|
|
@ -295,7 +295,7 @@ cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc
|
|||
# DEBUG = frame.f_code.co_filename.endswith('_debugger_case_tracing.py')
|
||||
# if DEBUG:
|
||||
# print('get_bytecode_while_frame_eval', frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename)
|
||||
|
||||
|
||||
thread_info.inside_frame_eval += 1
|
||||
additional_info.is_tracing = True
|
||||
try:
|
||||
|
|
@ -303,18 +303,19 @@ cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc
|
|||
if main_debugger is None:
|
||||
return _PyEval_EvalFrameDefault(frame_obj, exc)
|
||||
frame = <object> frame_obj
|
||||
|
||||
|
||||
if thread_info.thread_trace_func is None:
|
||||
trace_func, apply_to_global = fix_top_level_trace_and_get_trace_func(main_debugger, frame)
|
||||
if apply_to_global:
|
||||
thread_info.thread_trace_func = trace_func
|
||||
|
||||
|
||||
if additional_info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE, CMD_STEP_INTO_COROUTINE) or \
|
||||
main_debugger.break_on_caught_exceptions or \
|
||||
main_debugger.break_on_user_uncaught_exceptions or \
|
||||
main_debugger.has_plugin_exception_breaks or \
|
||||
main_debugger.signature_factory or \
|
||||
additional_info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE) and main_debugger.show_return_values and frame.f_back is additional_info.pydev_step_stop:
|
||||
|
||||
|
||||
# if DEBUG:
|
||||
# print('get_bytecode_while_frame_eval enabled trace')
|
||||
if thread_info.thread_trace_func is not None:
|
||||
|
|
@ -326,7 +327,7 @@ cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc
|
|||
# if DEBUG:
|
||||
# print('get_bytecode_while_frame_eval always skip', func_code_info.always_skip_code)
|
||||
if not func_code_info.always_skip_code:
|
||||
|
||||
|
||||
if main_debugger.has_plugin_line_breaks or main_debugger.has_plugin_exception_breaks:
|
||||
can_skip = main_debugger.plugin.can_skip(main_debugger, <object> frame_obj)
|
||||
|
||||
|
|
@ -337,7 +338,7 @@ cdef PyObject * get_bytecode_while_frame_eval(PyFrameObject * frame_obj, int exc
|
|||
frame.f_trace = thread_info.thread_trace_func
|
||||
else:
|
||||
frame.f_trace = <object> main_debugger.trace_dispatch
|
||||
|
||||
|
||||
if can_skip and func_code_info.breakpoint_found:
|
||||
# if DEBUG:
|
||||
# print('get_bytecode_while_frame_eval new_code', func_code_info.new_code)
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ file_system_encoding = getfilesystemencoding()
|
|||
_CACHE_FILE_TYPE = {}
|
||||
|
||||
pydev_log.debug('Using GEVENT_SUPPORT: %s', pydevd_constants.SUPPORT_GEVENT)
|
||||
pydev_log.debug('pydevd __file__: %s', os.path.abspath(__file__))
|
||||
|
||||
|
||||
#=======================================================================================================================
|
||||
|
|
@ -496,6 +497,7 @@ class PyDB(object):
|
|||
# and later it should be assigned back (to prevent concurrency issues).
|
||||
self.break_on_uncaught_exceptions = {}
|
||||
self.break_on_caught_exceptions = {}
|
||||
self.break_on_user_uncaught_exceptions = {}
|
||||
|
||||
self.ready_to_run = False
|
||||
self._main_lock = thread.allocate_lock()
|
||||
|
|
@ -1562,6 +1564,7 @@ class PyDB(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries=False
|
||||
):
|
||||
|
|
@ -1572,6 +1575,7 @@ class PyDB(object):
|
|||
expression,
|
||||
notify_on_handled_exceptions,
|
||||
notify_on_unhandled_exceptions,
|
||||
notify_on_user_unhandled_exceptions,
|
||||
notify_on_first_raise_only,
|
||||
ignore_libraries
|
||||
)
|
||||
|
|
@ -1593,6 +1597,13 @@ class PyDB(object):
|
|||
pydev_log.critical("Exceptions to hook always: %s.", cp)
|
||||
self.break_on_caught_exceptions = cp
|
||||
|
||||
if eb.notify_on_user_unhandled_exceptions:
|
||||
cp = self.break_on_user_uncaught_exceptions.copy()
|
||||
cp[exception] = eb
|
||||
if DebugInfoHolder.DEBUG_TRACE_BREAKPOINTS > 0:
|
||||
pydev_log.critical("Exceptions to hook on user uncaught code: %s.", cp)
|
||||
self.break_on_user_uncaught_exceptions = cp
|
||||
|
||||
return eb
|
||||
|
||||
def _mark_suspend(self, thread, stop_reason, original_step_cmd=-1):
|
||||
|
|
|
|||
|
|
@ -567,6 +567,7 @@ def get_server_filename_from_source_reference(source_reference):
|
|||
|
||||
def create_source_reference_for_linecache(server_filename):
|
||||
source_reference = _next_source_reference()
|
||||
pydev_log.debug('Created linecache id source reference: %s for server filename: %s', source_reference, server_filename)
|
||||
_line_cache_source_reference_to_server_filename[source_reference] = server_filename
|
||||
return source_reference
|
||||
|
||||
|
|
@ -575,8 +576,9 @@ def get_source_reference_filename_from_linecache(source_reference):
|
|||
return _line_cache_source_reference_to_server_filename.get(source_reference)
|
||||
|
||||
|
||||
def create_source_reference_for_frame_id(frame_id):
|
||||
def create_source_reference_for_frame_id(frame_id, original_filename):
|
||||
source_reference = _next_source_reference()
|
||||
pydev_log.debug('Created frame id source reference: %s for frame id: %s (%s)', source_reference, frame_id, original_filename)
|
||||
_source_reference_to_frame_id[source_reference] = frame_id
|
||||
return source_reference
|
||||
|
||||
|
|
@ -733,6 +735,8 @@ def setup_client_server_paths(paths):
|
|||
source_reference = 0
|
||||
else:
|
||||
source_reference = _next_source_reference()
|
||||
pydev_log.debug('Created source reference: %s for untranslated path: %s', source_reference, filename)
|
||||
|
||||
_client_filename_in_utf8_to_source_reference[translated] = source_reference
|
||||
_source_reference_to_server_filename[source_reference] = filename
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import pytest
|
||||
|
||||
|
||||
def some_call():
|
||||
assert 0
|
||||
|
||||
|
||||
def test_example():
|
||||
some_call() # stop here
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pytest.main([__file__, '--capture=no', '--noconftest'])
|
||||
print('TEST SUCEEDED!')
|
||||
|
|
@ -223,7 +223,7 @@ class JsonFacade(object):
|
|||
|
||||
'''
|
||||
filters = filters or []
|
||||
assert set(filters).issubset(set(('raised', 'uncaught')))
|
||||
assert set(filters).issubset(set(('raised', 'uncaught', 'userUnhandled')))
|
||||
|
||||
exception_options = exception_options or []
|
||||
exception_options = [exception_option.to_dict() for exception_option in exception_options]
|
||||
|
|
@ -629,6 +629,23 @@ def test_case_handled_exception_breaks(case_setup):
|
|||
writer.finished_ok = True
|
||||
|
||||
|
||||
@pytest.mark.skipif(IS_PY26, reason='Not ok on Python 2.6')
|
||||
def test_case_user_unhandled_exception(case_setup):
|
||||
with case_setup.test_file('_debugger_case_user_unhandled.py') as writer:
|
||||
json_facade = JsonFacade(writer)
|
||||
|
||||
json_facade.write_launch()
|
||||
json_facade.write_set_exception_breakpoints(['userUnhandled'])
|
||||
json_facade.write_make_initial_run()
|
||||
|
||||
json_facade.wait_for_thread_stopped(
|
||||
reason='exception', line=writer.get_line_index_with_content('stop here'), file='_debugger_case_user_unhandled.py')
|
||||
|
||||
json_facade.write_continue()
|
||||
|
||||
writer.finished_ok = True
|
||||
|
||||
|
||||
@pytest.mark.parametrize('target', [
|
||||
'absolute',
|
||||
'relative',
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ class Client(components.Component):
|
|||
"exceptionBreakpointFilters": [
|
||||
{"filter": "raised", "label": "Raised Exceptions", "default": False},
|
||||
{"filter": "uncaught", "label": "Uncaught Exceptions", "default": True},
|
||||
{"filter": "userUnhandled", "label": "User Uncaught Exceptions", "default": True},
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue