vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

support for <path>:<line>:<column>

Open testforstephen opened this issue 6 years ago • 1 comments

Originally created by @clankill3r at https://github.com/redhat-developer/vscode-java/issues/1025

It would be really great if :: was supported from using System.out.println. If it already is, then please provide a working example, cause I can't get it to work.

Just like we have clickable links now when having an exception:

Screen Shot 2019-08-27 at 13 13 16

I would like to be able to make those links as well.

testforstephen avatar Dec 03 '19 09:12 testforstephen

Hi @testforstephen, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

Suggestions for clickable <path>:<line>:<column> links:

  • Debug Console (when launched in debug mode) already hyperlinks stack-trace entries printed by e.printStackTrace():
    • Debugger for Java matches exception stack frames and makes them clickable. See: • https://github.com/redhat-developer/vscode-java/issues/1025#issuecomment-561024656
  • Integrated Terminal does not yet natively support arbitrary <file>:<line>:<col> links. To add this yourself, write a small VS Code extension using vscode.window.registerTerminalLinkProvider:
    • API reference: https://code.visualstudio.com/api/references/vscode-api#TerminalLinkProvider
    • Sample implementation: https://github.com/MaximilianKoestler/vscode-xtext-links/blob/652af3fc3955b85945b9bcf0266aec835755a50a/src/extension.ts#L25
  • Follow or contribute to the protocol design for println-based links here:
    • https://github.com/redhat-developer/vscode-java/issues/1025#issuecomment-561054803

Other references with low confidence:

Expand for more
  • Hyperlink support in terminal to open Java type/method/field (#2463): discusses using a TerminalLinkProvider for stack traces in mvn output. https://github.com/redhat-developer/vscode-java/issues/2463
  • Relaxing matching rules in Debug Console (#1405): shows that vscode-java-test already links stack-trace lines and suggests extending the same logic. https://github.com/microsoft/vscode-java-test/issues/1405#issuecomment-1147193551

The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

github-actions[bot] avatar Nov 11 '25 12:11 github-actions[bot]