2012-08-16 183 views
11

我在Eclipse中签出了一个maven项目,无法检查变量(右键单击该变量并单击检查选项)。Eclipse检查(Ctrl + Shift + I)不起作用

当我试图这样做,我得到以下信息:

To perform any evaluation, an expression must be compiled in the 
context of a java project's build path. The current execution 
context is not associated with a java project in the work-space. 

任何一个可以知道这样做的原因可能是什么?

在此先感谢。

回答

3

我的解决了这个问题做了以下内容:在project ->build path -> select source tab -> add folder

右键单击,然后我加入 其中包含Java类的文件夹。

8

This可能是有用的:

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. 
3

另外,在您的启动配置中,请确保源路径已正确指定。

也就是说: 运行/调试配置/源标签/添加.../Java项目

确保包含源代码项目是在该列表中!

+0

这就是它在我的情况,但随着服务器。双击服务器 - >打开启动配置 - >源代码 - >添加 - >“您的项目”。 (应按PSR所述选择源文件夹。) – 2017-03-01 11:04:55

0

我得到了同样的错误信息。

为了解决这个 "Debug Configuration" >> {{JAVA_DEBUG_APPLICATION_NAME}} >> Source (tab)

检查源正确添加,

对于我来说,

  1. ,同时调试它打开类文件,它不应该被编辑的Java代码。
  2. 得到了错误的消息也

我已删除从源标签的来源,它解决了这两个问题

相关问题