forked from microsoft/debugpy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly translate line in Goto Target. Fixes microsoft#150
- Loading branch information
Showing
5 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_source_map_goto_target.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Some comment lines to move the function below | ||
# Some comment lines to move the function below | ||
# Some comment lines to move the function below | ||
# Some comment lines to move the function below | ||
|
||
|
||
def full_function(): | ||
# Note that this function is not called, it's there just to make the mapping explicit. | ||
# The test case should stop at `a = 1` and then skip the `print('Skip this print')`. | ||
# map to Cell1, line 1 | ||
a = 1 # map to Cell1, line 2 | ||
print('Skip this print') # map to Cell1, line 3 | ||
print('TEST SUCEEDED') # map to Cell1, line 4 | ||
b = 2 # map to Cell1, line 5 | ||
|
||
|
||
if __name__ == '__main__': | ||
code = compile('''# line 1 | ||
a = 1 # line 2 | ||
print('Skip this print') # line 3 | ||
print('TEST SUCEEDED') # line 4 | ||
b = 2 # line 5 | ||
''', '<Cell1>', 'exec') | ||
exec(code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters