-
Notifications
You must be signed in to change notification settings - Fork 113
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
Stack trace detection do not work in colored console #535
Comments
See various console pattern match listeners defined in https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/master/org.eclipse.jdt.debug.ui/plugin.xml#L3503 I guess they can't parse stack traces with ASNI escape characters. |
How can I reproduce this? I've triggered an exception ( The output is in the standard error color, the file names have the link color, underlined, I can click on them, and they take me there. The behavior seems identical with the ANSI support enabled / disabled. Thanks, |
Note: I've tried this from a small app (just put that code in main and running it), and from maven, in an unit test. |
Good question, I assume the follwing should work:
|
Sorry, I can't figure out how to reproduce it. I've created a maven project from scratch, and tried building and running tests, both from right click -- Run as -- Maven install, And tried to trigger the dumping of the extension by introducing of some code that fails at runtime (in the unit tests).
They do, but not with those escape sequences ( |
Cant you simply have a main with sytem out my example? |
OK, I finally got it! I don't know what would create that kind of output, I didn't manage to find a way to create an exception with those escapes.
I'll dig into it this week-end (well, starting in less than 24h from now :-) |
Yeah it might be hard to reproduce, as I'm often developing maven-plugs (in contrast to using them in a build) you can screw up maven in different ways and it might throw exceptions/print messages at you that are not show in a regular maven build, so using system-out seems the most suitable here for validation. |
Created PR (eclipse-jdt/eclipse.jdt.debug#148) Thanks @iloveeclipse for the pointer, it was right on and saved me a lot of digging time. It is kind of clunky, and detection for the link seems to be done in two places. Once in I wonder if there is a way to refactor and reuse the same code. |
Future cleanup? In the current fix I've tried to not change things too much (to not shake the boat after M2 :-) But I would look into reusing the code for link detection. And probably even better would be to implement the idea in issue #539 |
Gentle ping? Thank you, |
@mihnita as you are a commiter you don't need to wait (unless RC period) for approval of others, if you are fine with it, just go ahead. If you like you can even request reviewer in a PR. So I would suggest, update your PR with the latest master, check that builds are running and then ask for approval for RC1 any of the project-leads here can approve: |
One clarification. Patch is in JDT so one needs approval/review/push from https://projects.eclipse.org/projects/eclipse.jdt/who |
Thanks. Still learning the ropes :-) Being in JDT I also don't have the right to assign the PR to someone. Thank you, |
@mihnita do you plan to work on this to get this fixed in this release? You should be able to reproduce it the following way:
The build will fail with an internal error no stack traces are detected and one can't click to jump into the code. |
A good discussion in this closed PR: eclipse-jdt/eclipse.jdt.debug#148 I will summarize it a bit, but you can go there for the complete thread The main part, from laeubi:
I've looked again at how the detection is implemented, and it is simply
So it looks like changing the In the PR:
|
That sounds like a good idea! Maybe one can have |
If the coloured output includes a stacktrace, then eclipse cant detect stack traces anymore.
@mihnita I noticed this with m2e and a failing maven build (e.g. one can enable -e or -X to get stack traces), I assume this is because if you copy this it results in and this is probably the thing also the Stack-Trace detection uses and then can't link the result to code:
The text was updated successfully, but these errors were encountered: