Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Why does the debugger sometimes not select the decompiled class?
Why does the debugger sometimes not select the decompiled class? [message #1866273] Fri, 24 May 2024 17:02 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 810
Registered: July 2009
Senior Member
Using Eclipse 2024-03.

I often have to step through code I don't have source for, so I use the Enhanced Class Decompiler. This works fine for viewing classes, but I often run into an annoyance in the debugger. Even though I am viewing the decompiled class in one editor buffer, when the debugger hits a breakpoint, it creates another editor buffer for the class and just says "Source not found", with the "Edit Source Lookup Path" button.

I can muck through it as I can see the line number in the stacktrace, so I go to the decompiled class view and go to that line number. I can still see the variables in the Variables pane, and I can still use the "Step Over" and related actions. As I do that, I can watch the line number in the stacktrace change. If it goes to another method, or even another class, I can go to that line number or the other decompiled class, but it's really annoying to have to do this.

I thought perhaps this has something to do with file associations. I ensured that "Class Decompiler Viewer" is set as the default "Associated editor" for both "*.class" and "*.class without source".
Re: Why does the debugger sometimes not select the decompiled class? [message #1866276 is a reply to message #1866273] Fri, 24 May 2024 17:19 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 810
Registered: July 2009
Senior Member
Actually, I didn't mention what I now realize is an important clue.

My test case for this today is in debugging a startup problem in Tomcat. I set the breakpoints in "org.apache.catalina.core.StandardContext", but when it hits the breakpoint, the editor buffer is labeled "TomcatEmbeddedContext(StandardContext)". The "TomcatEmbeddedContext" class is a subclass of "StandardContext".
Re: Why does the debugger sometimes not select the decompiled class? [message #1866288 is a reply to message #1866276] Fri, 24 May 2024 20:05 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 810
Registered: July 2009
Senior Member
What's odd is that this sometimes works the way I want, showing the breakpoint in the Decompiler view instead of the "Source not found" buffer. It seems to change on Eclipse restart.
Re: Why does the debugger sometimes not select the decompiled class? [message #1867182 is a reply to message #1866273] Tue, 18 June 2024 18:41 Go to previous message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 132
Registered: February 2010
Location: Bangalore, India
Senior Member
Have you tried attaching the Source in Debug Configurations Dialog in Dependencies tab?

Sarika Sinha
JDT Programmer
Previous Topic:Eclipse startup time slow (JBoss Tools)
Next Topic:hover shows empty box
Goto Forum:
  


Current Time: Tue Jan 21 09:41:42 GMT 2025

Powered by FUDForum. Page generated in 0.16302 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top