Debug调试运行,看到如下提示,运行就会非常慢。
产生的原因
官方解释:https://intellij-support.jetbrains.com/hc/en-us/articles/206544799-Java-slow-performance-or-hangups-when-starting-debugger-and-stepping
方法断点造成触发的事件变多,开销变大,性能下降。
解决方法
使用快捷键:Ctrl+Shift+F8
或者点击如下位置,打开View Breakpoints
去掉Java Method Breakpoints,然后点击Done,再进行Debug调试,就正常了。