我有一个从Git克隆的Maven项目。项目已成功构建并运行完美。但是,当我调试并尝试评估函数/表达式时,它给我错误提示-
expression must be compiled in the context of a Java Project's build path.
我阅读了以前的堆栈溢出答案,并做了以下(没有结果)-
我在.project文件中添加了Java性质,然后在源代码查找中添加了Java Project。我仍然遇到相同的错误。
如果我从源代码查找中删除Java项目并在添加源代码查找路径时选择选项-“工作区文件夹”,则会出现Null Pointer异常。
有人可以告诉我如何解决吗?
答案 0 :(得分:-1)
尝试一下!!!
Find the thread in your debug window that you are in the breakpoint for. Right click on it. Under relaunch should be an edit launch configuration selection. Select that.
Select Source tab. Add. Java Project. Select the java project that the code exists in.