unable to compile conditional breakpoint missing java project context
Asked Answered
T

1

9

This is a typical java maven project. The run time instance and source code are exactly the same version. I run into the same error "unable to compile conditional breakpoint missing java project context" by trying on the latest Eclipse(2020-03 4.15.0) and (2018-09 4.9.0). The condition is pretty straightforward as below:

onestring.equalIgnoreCase("abc") && this.anotherString.equalIgnoreCase("edf")

I googled and it seems like it is an Eclipse bug. Anyone here experienced the same? or anything I did wrong?

Transubstantiation answered 6/6, 2020 at 12:17 Comment(4)
Welcome to SO, meiju! Please edit your question and include how you setup the Java project in Eclipse, I found similar question, that has an answer with solution (link to blog post).Karimakarin
this is a typical pom java project, I used import existing pom project to import it into Eclipse. I ran the instance "catalina.bat jpda run" and listen to port 8000. And from Eclipse, I create remote debug with port 8000. when the condition is met, I expect it stops at the line. but instead I got the "unable to compile conditional breakpoint missing java project context" error.Transubstantiation
Maybe the source is missing or the remote application was compiled without debug info. Will it stop at a regular breakpoint and can you see the source code? Please provide an example to reproduce this issue including Java code, not only the breakpoint condition. What makes you think it's an Eclipse bug (if you found an open bug report, please link it)?Ingot
Eclipse bug issue bugs.eclipse.org/bugs/show_bug.cgi?id=542089Concordance
D
5

Literally just found a solution yesterday. Try right-clicking the stackframe, then "Import Binary Project".

Debbi answered 10/5, 2022 at 14:57 Comment(2)
Thanks user! This indeed seems to work reliably. I do wonder though: What would the figurative meaning of finding a solution the day before one posts it in SO be? ;PThrombosis
I am running version 4.27 and I not see "Import Binary Project" in the context menu.Lamella

© 2022 - 2024 — McMap. All rights reserved.