Skip to content

[Bug] - Can not find class from logs in terminal #3822

Open

Description

@mamilic

When I try to navigate to classname by CTRL+Left Click from the logs it can not find it.

Environment
  • Operating System: Windows 11
  • JDK version: 21
  • Visual Studio Code version: 1.94.2
  • Java extension version: 1.35.1
Steps To Reproduce
  1. Open demo.zip
  2. Run the DemoApplication.java
  3. Try to CTRL + Left Click on com.example.demo.DemoApplication from the logs
    image
  4. It will open input box with that full classname, however as it is full path it can not find it, only DemoApplication can be found.
    image

Activity

  1. rgrunber commented on Oct 25, 2024

    @rgrunber
    Member

    Yup, I see the same behaviour. The problem is in how the value shows up in the command palette. It's being inserted directly without the # at the beginning. That # is used to indicate it's a workspace symbol search. You can confirm this by doing Go -> Go To Symbol In Workspace and you'll see the command palette comes up with a # .

    Initially I thought there's not much we can do since it seems like something VS Code handles. However, I looked inside vscode-java-debug (I assume you have this installed), I found : https://github.com/microsoft/vscode-java-debug/blob/main/src/terminalLinkProvider.ts#L18-L60 .

    It looks like the current implementation only creates links for stacktrace elements. @jdneo does it make sense to move this into vscode-java-debug and add this as a proposed enhancement there ? Is the current "link-ification" of qualified elements coming from some default detection in VS Code itself ? Seems like vscode-java-debug should try to override it. Detecting fully qualified names might be tricky though.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions