diff --git a/ptvsd/pydevd/_pydevd_bundle/pydevd_frame.py b/ptvsd/pydevd/_pydevd_bundle/pydevd_frame.py index 5458c330..0cc4f787 100644 --- a/ptvsd/pydevd/_pydevd_bundle/pydevd_frame.py +++ b/ptvsd/pydevd/_pydevd_bundle/pydevd_frame.py @@ -36,12 +36,10 @@ TRACE_PROPERTY = 'pydevd_traceproperty.py' get_file_type = DONT_TRACE.get -def handle_breakpoint_condition(py_db, info, breakpoint, new_frame, default_return_value): +def handle_breakpoint_condition(py_db, info, breakpoint, new_frame): condition = breakpoint.condition try: - val = eval(condition, new_frame.f_globals, new_frame.f_locals) - if not val: - return default_return_value + return eval(condition, new_frame.f_globals, new_frame.f_locals) except: if type(condition) != type(''): @@ -559,10 +557,9 @@ class PyDBFrame: if stop or exist_result: condition = breakpoint.condition if condition is not None: - result = handle_breakpoint_condition(main_debugger, info, breakpoint, new_frame, - self.trace_dispatch) - if result is not None: - return result + result = handle_breakpoint_condition(main_debugger, info, breakpoint, new_frame) + if not result: + return self.trace_dispatch if breakpoint.expression is not None: handle_breakpoint_expression(breakpoint, info, new_frame) diff --git a/ptvsd/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py b/ptvsd/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py index c58f71cb..1ae15f4b 100644 --- a/ptvsd/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +++ b/ptvsd/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py @@ -28,7 +28,9 @@ def handle_breakpoint(frame, thread, global_debugger, breakpoint): condition = breakpoint.condition info = thread.additional_info if condition is not None: - handle_breakpoint_condition(global_debugger, info, breakpoint, new_frame, False) + result = handle_breakpoint_condition(global_debugger, info, breakpoint, new_frame) + if not result: + return False if breakpoint.expression is not None: handle_breakpoint_expression(breakpoint, info, new_frame) diff --git a/ptvsd/wrapper.py b/ptvsd/wrapper.py index c43ab861..e498a704 100644 --- a/ptvsd/wrapper.py +++ b/ptvsd/wrapper.py @@ -479,7 +479,7 @@ class VSCodeMessageProcessor(ipcjson.SocketIO, ipcjson.IpcChannel): { 'filter': 'raised', 'label': 'Raised Exceptions', - 'default': 'true' + 'default': 'false' }, { 'filter': 'uncaught', diff --git a/setup.py b/setup.py index 9e24c23a..898b93c7 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import os import os.path -from setuptools import setup +from setuptools import setup, Extension ROOT = os.path.dirname(os.path.abspath(__file__)) @@ -40,4 +40,7 @@ setup(name='ptvsd', 'License :: OSI Approved :: MIT License'], packages=['ptvsd'], package_data={'ptvsd': list(get_pydevd_package_data()) + ['ThirdPartyNotices.txt']}, + ext_modules=[Extension('ptvsd.pydevd._pydevd_bundle.pydevd_cython', + ['ptvsd/pydevd/_pydevd_bundle/pydevd_cython.c'], + optional=True)], )