Repository navigation
Support terminal link provider to handle python error stacks #20088
Copy link
Copy link
Open
Labels
area-terminalcommunity askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionalityneeds proposalNeed to make some design decisionsNeed to make some design decisions
Description
Type: Bug
Behaviour
Expected vs. Actual
When running python in debug mode, the resulting error messages have links to the error files, but clicking on the links does absolutely nothing.
Expected:
- I click on a link that appears in debug output. It should open up a new tab with the linked file
Actual:
- Nothing happens
Steps to reproduce:
- Created the following test scripts
main.py:
from utils.foo import multiply
def main():
v = multiply(5,6)
print(f"{v}")
if __name__ == "__main__":
main()
utils/foo.py:
def multiply(a: int, b: int) -> int:
raise ValueError("Help")
return a*b;
Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.9.14
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
- Value of the
python.languageServersetting: Jedi
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
User Settings
languageServer: "Jedi"
linting
• mypyEnabled: true
formatting
• provider: "black"
• blackArgs: "<placeholder>"
Extension version: 2022.16.1
VS Code version: Code 1.72.0 (Universal) (64bbfbf67ada9953918d72e1df2f4d8e537d340e, 2022-10-04T23:21:58.256Z)
OS version: Darwin arm64 21.6.0
Modes:
Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 3, 4, 4 |
| Memory (System) | 16.00GB (0.06GB free) |
| Process Argv | --crash-reporter-id 3ce12895-c380-469d-ab23-0e6239a2de95 |
| Screen Reader | no |
| VM | 0% |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-terminalcommunity askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionalityneeds proposalNeed to make some design decisionsNeed to make some design decisions
Activity
karthiknadig commentedon Oct 27, 2022
We need to provide a terminal link provider: https://code.visualstudio.com/updates/v1_49#_terminal-link-providers
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
[-]Links in debugging output don't work[/-][+]Support terminal link provider to handle python error stacks[/+]LarsDu commentedon Nov 11, 2022
Looks like 7 upvotes have been reached!
LarsDu commentedon Nov 28, 2022
Any updates?
brettcannon commentedon Dec 19, 2022
Larry Du (@LarsDu) We don't check feature requests until they hit their 60 day point since we solicited for votes, but I went ahead and marked this as having enough votes.
brettcannon commentedon Dec 19, 2022
#13938 has some notes on ideas.
https://docs.python.org/3/whatsnew/3.11.html#pep-657-fine-grained-error-locations-in-tracebacks will let us jump to the column, not just the line.
https://docs.python.org/3.12/whatsnew/3.12.html#improved-error-messages will let us provide quick fixes from the terminal.
LarsDu commentedon May 3, 2023
Any updates?
brettcannon commentedon May 4, 2023
Larry Du (@LarsDu) there's no need to ask for updates as we will post here when there any (i.e., unfortunately no updates). If you would like to submit a PR for this feature and up for doing one, please do so!