Skip to content

Commit 30931d5

Browse files
committed
Remove JUST_MY_CODE support from debugOptions. Fixes #64
1 parent 6b335f1 commit 30931d5

3 files changed

Lines changed: 3 additions & 18 deletions

File tree

src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,8 @@ def to_json(self):
3838
return json.dumps(dct)
3939

4040
def update_fom_debug_options(self, debug_options):
41-
42-
if 'JUST_MY_CODE' in debug_options:
43-
self.just_my_code = debug_options.get('JUST_MY_CODE')
44-
else:
45-
if 'DEBUG_STDLIB' in debug_options:
46-
pydev_log.error_once('DEBUG_STDLIB is deprecated. Use justMyCode=false instead.')
47-
self.just_my_code = not debug_options.get('DEBUG_STDLIB')
41+
if 'DEBUG_STDLIB' in debug_options:
42+
self.just_my_code = not debug_options.get('DEBUG_STDLIB')
4843

4944
if 'REDIRECT_OUTPUT' in debug_options:
5045
self.redirect_output = debug_options.get('REDIRECT_OUTPUT')
@@ -67,13 +62,11 @@ def update_fom_debug_options(self, debug_options):
6762
# Note: _max_exception_stack_frames cannot be set by debug options.
6863

6964
def update_from_args(self, args):
70-
7165
if 'justMyCode' in args:
7266
self.just_my_code = bool_parser(args['justMyCode'])
7367
else:
7468
# i.e.: if justMyCode is provided, don't check the deprecated value
7569
if 'debugStdLib' in args:
76-
pydev_log.error_once('debugStdLib is deprecated. Use justMyCode=false instead.')
7770
self.just_my_code = not bool_parser(args['debugStdLib'])
7871

7972
if 'redirectOutput' in args:
@@ -140,7 +133,6 @@ def unquote(s):
140133
'FIX_FILE_PATH_CASE': bool_parser,
141134
'CLIENT_OS_TYPE': unquote,
142135
'DEBUG_STDLIB': bool_parser,
143-
'JUST_MY_CODE': bool_parser,
144136
'STOP_ON_ENTRY': bool_parser,
145137
'SHOW_RETURN_VALUE': bool_parser,
146138
'MULTIPROCESS': bool_parser,
@@ -156,7 +148,6 @@ def unquote(s):
156148
'Jinja': 'FLASK_DEBUG=True',
157149
'FixFilePathCase': 'FIX_FILE_PATH_CASE=True',
158150
'DebugStdLib': 'DEBUG_STDLIB=True',
159-
'JustMyCode': 'JUST_MY_CODE=True',
160151
'WindowsClient': 'CLIENT_OS_TYPE=WINDOWS',
161152
'UnixClient': 'CLIENT_OS_TYPE=UNIX',
162153
'StopOnEntry': 'STOP_ON_ENTRY=True',

src/debugpy/_vendored/pydevd/tests_python/test_debugger.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ def test_case_3(case_setup):
242242
writer.write_make_initial_run()
243243
time.sleep(.5)
244244
breakpoint_id = writer.write_add_breakpoint(4, '')
245-
writer.write_add_breakpoint(5, 'FuncNotAvailable') # Check that it doesn't get hit in the global when a function is available
246245

247246
hit = writer.wait_for_breakpoint_hit()
248247
thread_id = hit.thread_id
@@ -262,8 +261,6 @@ def test_case_3(case_setup):
262261

263262
writer.write_run_thread(thread_id)
264263

265-
assert 17 == writer._sequence, 'Expected 17. Had: %s' % writer._sequence
266-
267264
writer.finished_ok = True
268265

269266

src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3805,11 +3805,10 @@ def test_just_my_code_debug_option_deprecated(case_setup, debug_stdlib, debugger
38053805
from _pydev_bundle import pydev_log
38063806
with case_setup.test_file('_debugger_case_debug_options.py') as writer:
38073807
json_facade = JsonFacade(writer)
3808-
args = dict(
3808+
json_facade.write_launch(
38093809
redirectOutput=True, # Always redirect the output regardless of other values.
38103810
debugStdLib=debug_stdlib
38113811
)
3812-
json_facade.write_launch(**args)
38133812
json_facade.write_make_initial_run()
38143813
output = json_facade.wait_for_json_message(
38153814
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
38253824
with open(f, 'r') as stream:
38263825
contents.append(stream.read())
38273826

3828-
assert 'debugStdLib is deprecated. Use justMyCode=false instead.' in ''.join(contents)
3829-
38303827
writer.finished_ok = True
38313828

38323829

0 commit comments

Comments
 (0)