断点/框架在IntelliJ中不起作用 [英] Breakpoints/Frames not working in IntelliJ

查看:63
本文介绍了断点/框架在IntelliJ中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,希望有人可以帮助我.我有一个在IntelliJ中运行的Spring Maven java Rest项目,我刚刚升级到最新版本2016.1.我正在使用的JDK版本是1.7.0_79,Maven v4.0,并且我具有Tomcat 7服务器.从IntelliJ运行Tomcat服务器时,调试断点根本无法捕获,并且我看不到任何帧.我已经尝试了所有在阳光下进行尝试以解决此问题的方法,该方法过去一直有效,但几天前就停止了. tomcat可以在调试和正常模式下启动,没有问题……只是无法捕获断点.这就是我尝试过的

Hello hoping someone can help me with this. I have a Spring Maven java Rest project I am running in IntelliJ, I just upgraded to the latest version 2016.1. JDK version I am using is 1.7.0_79, Maven v4.0 and I have a Tomcat 7 server. When running the Tomcat server from IntelliJ the debug breakpoints are not catching at all, and I am not seeing any frames. I have tried everything under the sun to try to resolve this, it used to be working but stopped a few days ago. The tomcat starts in both debug, and normal mode with no issue... just does not catch the breakpoints. This is what I have tried

  1. 删除了整个本地git分支,并在不同的位置重新克隆,然后在Intellij中重新打开.

  1. Deleted the entire local git branch and recloned in different location and reopened in Intellij.

文件->使缓存无效/重新启动

File -> Invalidate Caches/Restart

手动删除所有tomcat服务器文件夹并重新创建.

Manually deleting all tomcat server folders and recreating.

将调试配置从套接字切换到共享内存,反之亦然.

Switching the debug configuration, to Shared Memory from Socket and vice versa.

已检查套接字端口的端口冲突.

Checked for port conflicts for the socket port..

我没有方法级别或异常级别的断点.

I have no method level or exception level breakpoints.

如果有人可以帮助我开发逐步解决问题的方法,那就太好了.

If someone could help me develop a step-by-step approach to troubleshooting this that would be great.

推荐答案

您没有提到的一件事,所以我认为这可能是这里问题的核心,是远程调试...

One thing you haven't mentioned, so I think it may be the core of the problem here, is remote debugging...

要在服务器上调试代码,必须将调试器附加到其调试端口.这意味着以调试模式启动服务器,并在连接到正确端口的IntelliJ中创建Remote调试运行配置(应在服务器初始化日志记录中报告).

To debug your code on a server you have to attach your debugger to its debug port. This means starting the server in debug mode, and creating a Remote debugging run configuration in IntelliJ attached to the correct port (which should be reported in your server initialisation logging).

这是因为您的服务器运行在与要调试的JVM不同的JVM上,并且为了调试这两个JVM,必须通过tcp/ip端口进行通信.通过设置远程调试器,您可以让IntelliJ获得所需的信息,以便附加到远程JVM并通过其调试接口对其进行控制.

This is because your server is running on a different JVM than the one you're debugging on and in order to debug the two JVMs have to communicate over a tcp/ip port. By setting up a remote debugger you're letting IntelliJ have the information it needs in order to attach to the remote JVM and control it via its debugging interface.

一旦连接了远程调试器,就可以在调试模式下启动它,并以触发包含断点的代码的方式开始使用您的应用程序.服务器代码应停止执行,并且IntelliJ应该显示断点所在的行.

Once you have attached your remote debugger, start it in debug mode and start using your app in a way that triggers code that contains a breakpoint. The server code should stop executing and IntelliJ should show the line the breakpoint occurred on.

调试服务器代码时,请注意响应超时和其他此类问题.如果您有一个Web应用程序,则它可能会超时,等待您逐步完成调试会话.

Be aware of response timeouts and other such problems when debugging server code. If you have a webapp it may timeout waiting for you to step through your debug session.

这篇关于断点/框架在IntelliJ中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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