简体   繁体   English

遇到断点时,IntelliJ IDEA会降低整个计算机的速度

[英]IntelliJ IDEA slows down entire computer when a breakpoint is hit

I am using IntelliJ IDEA 12.1.6 on (64-bit) Windows 7 Enterprise (I've also seen this same problem with IDEA 11, though not as often). 我正在(64位)Windows 7 Enterprise上使用IntelliJ IDEA 12.1.6(我也已经看到IDEA 11出现了同样的问题,尽管这种情况并不常见)。 I am running it under Java 7 (1.7.45). 我正在Java 7(1.7.45)下运行它。

When I run a program in the IDE, under the debugger (local debugging), everything is fine until I hit a breakpoint (these are plain old on-a-specific-line breakpoints, not method breakpoints or exception breakpoints). 当我在IDE中的调试器(本地调试)下运行程序时,一切正常,直到遇到断点为止(这些断点是普通的特定行断点, 而不是方法断点或异常断点)。 Once the breakpoint is hit, virtually all the time (though not always) my entire machine slows to a near halt. 一旦达到断点,几乎整个时间(尽管并非总是如此)我的整个计算机的速度几乎都停止了。 All keyboard operations (not just in IDEA) slow way down (they eventually do get processed so the events are buffered, not lost). 所有键盘操作(不仅在IDEA中)缓慢进行(它们最终会得到处理,因此事件被缓冲而不丢失)。 Same for window operations (drag, minimize, raise, lower). 窗口操作相同(拖动,最小化,升高,降低)。 Once the program resumes from the breakpoint everything goes completely back to normal until the next time a breakpoint is hit. 一旦程序从断点恢复,一切将完全恢复正常,直到下一次命中断点为止。

This is obviously really annoying as it makes debugging essentially impossible. 这显然很烦人,因为它使调试基本上变得不可能。

I've had Task Manager up and don't see anything strange. 我已经安装了任务管理器,看不到任何奇怪的东西。 The CPU is not pegged, memory isn't maxed out, etc. My hard drive light isn't on. CPU 没有挂住,内存没有用尽,等等。我的硬盘驱动器指示灯不亮。

Any ideas on what's going on and (more importantly) how to fix it? 关于正在发生的事情以及(更重要的)如何解决它的任何想法?

It's hard to say what the problem is, but here are some things that might help: 很难说出问题是什么,但是以下一些事情可能会有所帮助:

  • Invalidate caches as described here --though be aware of the consequences. 如无效缓存描述这里 --though知道的后果。
  • Make sure you have only enabled those plugins you are actually using or likely to use. 确保仅启用了您实际使用或可能使用的那些插件。
  • Try to find if all breakpoints have the same problem or if, for example, you only have issues with Java breakpoints but not JavaScript ones. 尝试查找所有断点是否具有相同的问题,或者例如,您是否仅遇到Java断点而不遇到JavaScript断点。 If that happens, it could give you a clue. 如果发生这种情况,可能会给您一个线索。

Well, it looks like my specific problem is IE-related. 好吧,看来我的特定问题与IE有关。

The program I am debugging is the server-side of a webapp. 我正在调试的程序是webapp的服务器端。 (Sadly it is IE-only due to some weird stuff in the Ajax it is using -- I'm not responsible for that). (遗憾的是,由于它使用的Ajax中存在一些奇怪的内容,因此它仅是IE浏览器-我对此不负责)。

I have been setting my breakpoints, running the server under the debugger, and then doing stuff with the webapp in IE, which ultimately causes breakpoints to be hit. 我一直在设置断点,在调试器下运行服务器,然后在IE中使用webapp进行操作,最终导致命中断点。 When a breakpoint is hit and I am single-stepping, everything remains OK if I do not use the keyboard at all. 当碰到一个断点并且单步执行时,如果我根本不使用键盘,一切都将保持正常。 If I click on the various single-step icons or select the single-step actions via mouse from IDEA's "Run" menu everything keeps working. 如果我单击各种单步图标或通过鼠标从IDEA的“运行”菜单中选择单步动作,则一切都会正常进行。 But the moment I use F8 to single-step, or hit a key in any other problem (like in a mail program) the freeze happens. 但是当我使用F8单步执行或遇到其他任何问题(例如在邮件程序中)的关键时刻,冻结就发生了。

It finally occurred to me (shame on me) to run IE on another computer while running the server in the IDEA debugger on my main computer. 最终我想到了(对我感到羞耻),同时在我的主计算机上的IDEA调试器中运行服务器时在另一台计算机上运行IE。 When I do that, everything is fine and I can use the keyboard in any application, as much as I want to, and the freeze does not happen. 当我这样做时,一切都很好,我可以根据需要在任意应用程序中使用键盘,并且不会发生冻结。

So the problem seems to be IE causing weirdness when it has sent a request and is waiting for a response from the server. 因此,问题似乎是IE在发送请求并等待服务器响应时引起怪异。 Still, there does seem to be some interaction with IDEA because when I run IE on a separate computer and hit a breakpoint on my computer, I can use the keyboard all I want on the computer where I am running IE without any problems at all. 尽管如此,似乎仍然与IDEA有一些交互,因为当我在单独的计算机上运行IE并在计算机上遇到断点时,我可以在运行IE的计算机上使用所有想要的键盘,而没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM