Skip to content

Support terminal link provider to handle python error stacks #20088

Open

Description

@LarsDu

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:

  1. 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.languageServer setting: 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%

Activity

  1. karthiknadig commented on Oct 27, 2022

    @karthiknadig
    Member

    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.

  2. changed the title [-]Links in debugging output don't work[/-] [+]Support terminal link provider to handle python error stacks[/+] on Oct 27, 2022
  3. LarsDu commented on Nov 11, 2022

    @LarsDu
    Author

    Looks like 7 upvotes have been reached!

  4. LarsDu commented on Nov 28, 2022

    @LarsDu
    Author

    Any updates?

  5. brettcannon commented on Dec 19, 2022

    @brettcannon
    Member

    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.

  6. brettcannon commented on Dec 19, 2022

    @brettcannon
    Member

    #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.

  7. LarsDu commented on May 3, 2023

    @LarsDu
    Author

    Any updates?

  8. brettcannon commented on May 4, 2023

    @brettcannon
    Member

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalcommunity askFeature request that the community expressed interest infeature-requestRequest for new features or functionalityneeds proposalNeed to make some design decisions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions