Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea: open stacktrace links #7

Open
maxandersen opened this issue May 9, 2020 · 2 comments
Open

idea: open stacktrace links #7

maxandersen opened this issue May 9, 2020 · 2 comments

Comments

@maxandersen
Copy link
Member

Imagine the following:

you run an app or build in your terminal, ie. mvn package and an error occurs and a stacktrace is shown.

Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/fugue/Effect
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:68)
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:35)
        at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:63)

now in iterm2 you can actually setup regular expression to turn these stacktraces into hyperlinks.

would be interesting if we could support something like:

ide://open-stack-trace?stackline="com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:68)"

which would tell the IDE to search for DefaultHttpClientFactory.java and open it on line 68.

Not all editors would support this but at least eclipse, netbeans and vscode should technically be capable of doing it.

@maxandersen
Copy link
Member Author

A MVP version of this would be, having this stacktrace in console:

2020-09-03_10-46-45

have a click on one of the lines, ie:
at dev.jbang.cli.BaseScriptCommand.prepareScript(BaseScriptCommand.java:128)

would have startfix search for BaseScriptCommand.java, if one found turn that into a ide://open-file?file=<path to BaseScriptCommand.java and if mulitple open web page shwoing the multiple choices for the user then to choose.

furter out we could imagine using ide specific methods to just ask the IDE to locate this in its current open projects.

@fahad-israr
Copy link
Collaborator

Smart selction rules ?
Start with iterminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants