From 30931d560e374b1d25058050e3f46f36b77c2ddb Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Sun, 8 Mar 2020 09:12:29 -0300 Subject: [PATCH] Remove JUST_MY_CODE support from debugOptions. Fixes #64 --- .../_pydevd_bundle/pydevd_json_debug_options.py | 13 ++----------- .../_vendored/pydevd/tests_python/test_debugger.py | 3 --- .../pydevd/tests_python/test_debugger_json.py | 5 +---- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py index a3e7340db..c6def933c 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py @@ -38,13 +38,8 @@ def to_json(self): return json.dumps(dct) def update_fom_debug_options(self, debug_options): - - if 'JUST_MY_CODE' in debug_options: - self.just_my_code = debug_options.get('JUST_MY_CODE') - else: - if 'DEBUG_STDLIB' in debug_options: - pydev_log.error_once('DEBUG_STDLIB is deprecated. Use justMyCode=false instead.') - self.just_my_code = not debug_options.get('DEBUG_STDLIB') + if 'DEBUG_STDLIB' in debug_options: + self.just_my_code = not debug_options.get('DEBUG_STDLIB') if 'REDIRECT_OUTPUT' in debug_options: self.redirect_output = debug_options.get('REDIRECT_OUTPUT') @@ -67,13 +62,11 @@ def update_fom_debug_options(self, debug_options): # Note: _max_exception_stack_frames cannot be set by debug options. def update_from_args(self, args): - if 'justMyCode' in args: self.just_my_code = bool_parser(args['justMyCode']) else: # i.e.: if justMyCode is provided, don't check the deprecated value if 'debugStdLib' in args: - pydev_log.error_once('debugStdLib is deprecated. Use justMyCode=false instead.') self.just_my_code = not bool_parser(args['debugStdLib']) if 'redirectOutput' in args: @@ -140,7 +133,6 @@ def unquote(s): 'FIX_FILE_PATH_CASE': bool_parser, 'CLIENT_OS_TYPE': unquote, 'DEBUG_STDLIB': bool_parser, - 'JUST_MY_CODE': bool_parser, 'STOP_ON_ENTRY': bool_parser, 'SHOW_RETURN_VALUE': bool_parser, 'MULTIPROCESS': bool_parser, @@ -156,7 +148,6 @@ def unquote(s): 'Jinja': 'FLASK_DEBUG=True', 'FixFilePathCase': 'FIX_FILE_PATH_CASE=True', 'DebugStdLib': 'DEBUG_STDLIB=True', - 'JustMyCode': 'JUST_MY_CODE=True', 'WindowsClient': 'CLIENT_OS_TYPE=WINDOWS', 'UnixClient': 'CLIENT_OS_TYPE=UNIX', 'StopOnEntry': 'STOP_ON_ENTRY=True', diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py b/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py index f4f1906e4..d8a7940b3 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_debugger.py @@ -242,7 +242,6 @@ def test_case_3(case_setup): writer.write_make_initial_run() time.sleep(.5) breakpoint_id = writer.write_add_breakpoint(4, '') - writer.write_add_breakpoint(5, 'FuncNotAvailable') # Check that it doesn't get hit in the global when a function is available hit = writer.wait_for_breakpoint_hit() thread_id = hit.thread_id @@ -262,8 +261,6 @@ def test_case_3(case_setup): writer.write_run_thread(thread_id) - assert 17 == writer._sequence, 'Expected 17. Had: %s' % writer._sequence - writer.finished_ok = True diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py index e9aec6f28..ddbad1828 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py @@ -3805,11 +3805,10 @@ def test_just_my_code_debug_option_deprecated(case_setup, debug_stdlib, debugger from _pydev_bundle import pydev_log with case_setup.test_file('_debugger_case_debug_options.py') as writer: json_facade = JsonFacade(writer) - args = dict( + json_facade.write_launch( redirectOutput=True, # Always redirect the output regardless of other values. debugStdLib=debug_stdlib ) - json_facade.write_launch(**args) json_facade.write_make_initial_run() output = json_facade.wait_for_json_message( OutputEvent, lambda msg: msg.body.category == 'stdout' and msg.body.output.startswith('{')and msg.body.output.endswith('}')) @@ -3825,8 +3824,6 @@ def test_just_my_code_debug_option_deprecated(case_setup, debug_stdlib, debugger with open(f, 'r') as stream: contents.append(stream.read()) - assert 'debugStdLib is deprecated. Use justMyCode=false instead.' in ''.join(contents) - writer.finished_ok = True