Skip to content

Commit

Permalink
Remove JUST_MY_CODE support from debugOptions. Fixes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Mar 9, 2020
1 parent 6b335f1 commit 30931d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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',
Expand Down
3 changes: 0 additions & 3 deletions src/debugpy/_vendored/pydevd/tests_python/test_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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('}'))
Expand All @@ -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


Expand Down

0 comments on commit 30931d5

Please sign in to comment.