无法在Intellij IDEA中设置Java断点 [英] Cannot set Java breakpoint in Intellij IDEA

查看:760
本文介绍了无法在Intellij IDEA中设置Java断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将断点放入GoogleAppEngine源(SDK 1.7.0),但IDEA Ultimate(11.0.2)只是不断地告诉我警告:在类com中的第482行找不到可执行代码.google.appengine.api.memcache.AsyncMemcacheServiceImpl

I'm trying to put breakpoints into the GoogleAppEngine sources (SDK 1.7.0) but IDEA Ultimate (11.0.2) just keeps telling me Warning: No executable code found at line 482 in class com.google.appengine.api.memcache.AsyncMemcacheServiceImpl.

当我从单元测试运行代码时,我收到此错误消息,我开始开发服务器。

I get this error message both when I run the code from unit tests and I start up the development server.

这是非常浪漫的。无论如何,我的来源是外部的(相对于IDEA家庭和项目主目录),我的jar文件位于Appengine SDK lib目录下。

It's quite annonying. Anyway my sources are in an external (relative to both the IDEA home and the project home) directory, and my jar files are under the Appengine SDK lib dir.

我的jar文件作为项目库添加​​到模块,我的源附加到该库。我也在玩模块依赖,但没有任何运气。最后,我决定将这个库放入编译范围,但这是一个不错的主意,因为SDK在运行时提供了这些jar,所以我决定退回到提供的范围。

My jar files are added as project library to the module, and my sources are attached to this library. I was playing around with module dependencies as well, but without any luck. Finally I decided to put this library into Compile scope, but that was a bad idea since the SDK provides these jars at runtime, so I decided to fall back to Provided scope.

我也使用模块依赖关系选项卡上的导出复选框,但是我认为这是无关紧要的,根据 web帮助,导出只有当你有依赖模块,并且你想使这些模块中的库可用时,重要。

I also played with the export checkbox on the module dependencies tab, but I think this is irrelevant, according to the web help, export is only important when you have dependent modules and you want to make your library available in these modules as well.

无论如何,这个问题 4年前也。所以我现在想知道现在是否真的很难解决这个问题?

Anyway, this question arised 4 years ago also. So I'm wondering now whether is it really so hard to solve this issue?

我现在非常失望。到目前为止,我没有任何IDEA问题...我看到这个问题还给其他人,所以这不是唯一的我猜。

I'm very disappointed now. I didn't have any problems with IDEA so far... I saw that this problem arised to other people as well, so this is not unique I guess.

任何帮助是赞赏。

由于我的 javap 实验,我编辑了我的问题:看来,来源是 NOT 不同步。我检查了SVN的1.7.0相关版本,我使用的是1.7.0 SDK,所以这些应该不会失去同步。

I edited my question due to my javap experiments below: It seems that the classes and the sources are NOT out of sync. I checked out the 1.7.0 related revision from SVN, and I'm using the 1.7.0 SDK, so these should not be out of sync at all.

推荐答案

我有类似的问题,已经应用了各种尝试。以下是我通常的步骤:

I had similar problems and various attempts has been applied. Below is my usual steps:


  1. 如果您使用Maven依赖关系,请转到Maven项目 - >刷新

  2. 如果这不行,请尝试顶部菜单 - >构建 - >重建项目

  3. 如果仍然无法使用,请尝试顶部菜单 - >文件 - >无效缓存/重新启动

  4. 如果仍然不起作用,则$ CATALINA_BASE / bin / catalina.sh停止,然后开始

  1. If you are using Maven dependencies, go to Maven Projects -> refresh
  2. If that does not work, Try top menu --> Build --> Rebuild Project
  3. If that still doesn't work, try top menu --> File --> Invalidate Cache/Restart
  4. If that still doesn't work, then $CATALINA_BASE/bin/catalina.sh stop, then start

此后,通常覆盖99%的问题。否则,您可能还要检查其他一些可能性。

After this, usually it covers 99% of the problems. Otherwise, Probably you will have to examine some other possibilities.

这篇关于无法在Intellij IDEA中设置Java断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆