-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
In Debugpy, exceptions raised in Python 3.11 are missing the fine-grained position:
For example, in the following code:
d = {
"x": {
"y": {
"z": {
"theta": 1
}
}
}
}
result = d["x"]["y"]["z"]["beta"]
On the CLI I get the position of the KeyError offset in the line underlined using PEP657 API:
$ python exploding_kitten.py
...
File "/Users/anthonyshaw/tmp/exploding_kitten.py", line 11, in <module>
result = d["x"]["y"]["z"]["beta"]
~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'beta'
But in VS Code it only highlights the line and not the position of the exception, making it harder to work out where the error came from.
Please can PEP657 be implemented in debugpy so that the Stopped event sent back via DAP include the position (start col, end col) of the raised exception.
davisagli, ivoflipse, ryancheley, dhirschfeld, jugmac00 and 27 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request