diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py index f8d7c62f3..8888193e6 100644 --- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py @@ -504,13 +504,13 @@ def on_setbreakpoints_request(self, py_db, request): error_msg = 'Breakpoint not validated (reason unknown -- please report as bug).' breakpoints_set.append(pydevd_schema.Breakpoint( - verified=False, line=result.translated_line, message=error_msg).to_dict()) + verified=False, line=result.translated_line, message=error_msg, source=arguments.source).to_dict()) else: # Note that the id is made up (the id for pydevd is unique only within a file, so, the # line is used for it). # Also, the id is currently not used afterwards, so, we don't even keep a mapping. breakpoints_set.append(pydevd_schema.Breakpoint( - verified=True, id=self._next_breakpoint_id(), line=result.translated_line).to_dict()) + verified=True, id=self._next_breakpoint_id(), line=result.translated_line, source=arguments.source).to_dict()) body = {'breakpoints': breakpoints_set} set_breakpoints_response = pydevd_base_schema.build_response(request, kwargs={'body': body}) diff --git a/tests/func/test_breakpoints.py b/tests/func/test_breakpoints.py index 1aa954a45..e4ef6c605 100644 --- a/tests/func/test_breakpoints.py +++ b/tests/func/test_breakpoints.py @@ -417,7 +417,9 @@ def code_to_debug(): assert breakpoints == [{ 'verified': False, 'message': 'Breakpoint in file that does not exist.', - 'source': {}, + 'source': ANY.dict_with({ + 'path': Path('invalid_file.py') + }), 'line': 1 }] diff --git a/tests/func/test_exclude_rules.py b/tests/func/test_exclude_rules.py index 739d4bdfd..1a47c342d 100644 --- a/tests/func/test_exclude_rules.py +++ b/tests/func/test_exclude_rules.py @@ -132,7 +132,9 @@ def call_func(): 'Breakpoint in file excluded by filters.\n' 'Note: may be excluded because of "justMyCode" option (default == true).' ), - 'source': {}, + 'source': ANY.dict_with({ + 'path': Path(code_to_debug) + }), 'line': 1 }]