support for <path>:<line>:<column>
Originally created by @clankill3r at https://github.com/redhat-developer/vscode-java/issues/1025
It would be really great if
Just like we have clickable links now when having an exception:
I would like to be able to make those links as well.
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 usingvscode.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
TerminalLinkProviderfor stack traces inmvnoutput. https://github.com/redhat-developer/vscode-java/issues/2463 - Relaxing matching rules in Debug Console (#1405): shows that
vscode-java-testalready 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!