Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03
Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1823120] Thu, 19 March 2020 17:04 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 690
Registered: July 2009
Senior Member
I've been using 2019-12 since the release, and just upgraded to 2020-03 yesterday.

I run in debug our Maven SpringBoot applications quite often. Stepping through the code works perfectly fine, before today.

Today I ran one application in debug that I've run many times. It started up fine, but when it hit a breakpoint that I set, it was not able to find the source. I inspected the run configuration, and it specifies the correct project. The project itself looks like a normal Maven project in the package explorer. It shows the correct source folders, and there are no errors.

I even tried clicking "Edit Source Lookup Path". The "Default" entry has all the maven dependencies and one folder that we always manually add to our springboot run configurations (a folder with additional properties files). There were no source folders. I then manually added the project to the source lookup and inspected the result. It appeared to have all the relevant folders from that project. However, even after I closed the editor window for the file and reopened it from the stack entry, it still said it can't find the source file.

I checked the error log. I saw a string of exceptions about a hover problem in Spring IDE (which I will report), but nothing that would cause the problem I'm seeing.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1823123 is a reply to message #1823120] Thu, 19 March 2020 18:19 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 690
Registered: July 2009
Senior Member
However, I did confirm that when I terminate the debugged application, and then restart it and run through my test case, when it hits the breakpoint again, it does show the source code. I then tried removing the explicit add of the project to the run configuration (even though it's already set for the project) and running through the same test again, and it again cannot find the source.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826139 is a reply to message #1823123] Mon, 20 April 2020 07:44 Go to previous messageGo to next message
Noopur Gupta is currently offline Noopur GuptaFriend
Messages: 57
Registered: December 2012
Member
Does the same scenario work in Eclipse 2019-12? If so, please open a bug report at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT&component=Debug with steps to reproduce to investigate further.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826355 is a reply to message #1826139] Thu, 23 April 2020 23:00 Go to previous messageGo to next message
Shawn Stamey is currently offline Shawn StameyFriend
Messages: 4
Registered: April 2020
Junior Member
Did a bug report ever get opened on this?

I am seeing the same exact problem after updating to 20-03, and my project works great on 2019-12.

I was able to work around it by going into Debug Configurations, clicking on Source tab, and adding Workspace Folder references manually.
This was a bit of a pain as there are like 23 projects to add for my workspace.

I looked at the "Default" entry that is pre-populated and it does seem to show the same workspace references that I added, but for some reason they aren't used during debugging.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826357 is a reply to message #1826139] Fri, 24 April 2020 00:50 Go to previous messageGo to next message
Shawn Stamey is currently offline Shawn StameyFriend
Messages: 4
Registered: April 2020
Junior Member
I found the bug that was logged on this issue, which seems to have the problem correctly identified.
Added my vote to the issue, hope others seeing this do the same so we can get this fixed.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=514914
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826424 is a reply to message #1826357] Fri, 24 April 2020 16:33 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 690
Registered: July 2009
Senior Member
Shawn, the cited bug describes a completely different problem, and as you can see, that problem was reported in 2017, and is not resolved. You've indicated your problem does not occur in 2019-12, but does occur in 2020-03. Clearly, neither the symptoms nor the timeline match.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826432 is a reply to message #1826424] Fri, 24 April 2020 18:10 Go to previous messageGo to next message
Shawn Stamey is currently offline Shawn StameyFriend
Messages: 4
Registered: April 2020
Junior Member
David, you're right on the symptoms and timeline (I was focused on the problem and neglected to notice it was a 2017 issue), but what caught my eye was the description of the bug:

"The bug is located in StandardSourcePathProvider. The Maven container (MavenClasspathContainer) is resolved with JavaRuntime.resolveRuntimeClasspathEntry(...), which produces a runtime classpath (output locations) instead of a source lookup path (project references)."

When I open Debug Configurations -> Source tab and expand "Default" entry, and compare 2019-12 with 2020-03 I see what appears to be this same kind of issue.
- On 2019-12, under Default I see my project names: "endpoint.tests"
- On 2020-03, under Default I see "classes - \endpoint.tests\target"

So maybe it is technically a different bug and maybe this needs a different fix, but it is essentially the same mixup happening, Eclipse is being told to search the class files in the project instead of the source code in the project.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826445 is a reply to message #1826432] Fri, 24 April 2020 23:17 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 690
Registered: July 2009
Senior Member
I did not notice that. I never did file a bug report, because I didn't know how to reliably demonstrate the problem. Please create one with that useful bit of information, and cite the similarity to the other bug.
Re: Breakpoint in debugged application doesn't show source file, after upgrade to 2020-03 [message #1826606 is a reply to message #1826445] Mon, 27 April 2020 16:27 Go to previous message
Shawn Stamey is currently offline Shawn StameyFriend
Messages: 4
Registered: April 2020
Junior Member
Thanks David, I've narrowed down the repro steps and opened a distinct ticket on the problem with an example project attached.
For me, it seems to not affect normal java app debugging, but rather TestNG Test debugging.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=562531
Previous Topic:im getting "var cannot be resolved to a type" error
Next Topic:eclipse ide installing error
Goto Forum:
  


Current Time: Sat Nov 28 11:49:36 GMT 2020

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

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

Back to the top