Breakpoint at“throw new SilentExitException()”在Eclipse + Spring Boot中 [英] Breakpoint at "throw new SilentExitException()" in Eclipse + Spring Boot
问题描述
每次我在Eclipse IDE(Spring Tool Suite)中的调试模式下运行我的Spring Boot项目时,线程都停在throw new SilentExitException();即使没有断点也行。
Everytime I run my Spring Boot project on debug mode in Eclipse IDE (Spring Tool Suite), the thread stops at "throw new SilentExitException();" line even without a breakpoint.
避免这种行为的一些解决方案?
Some solution to avoid this behavior?
org.springframework.boot.devtools .restart.SilentExitExceptionHandler.exitCurrentThread()(第53行):
org.springframework.boot.devtools.restart.SilentExitExceptionHandler.exitCurrentThread() (line 53):
public static void exitCurrentThread() {
throw new SilentExitException();
}
这在升级到1.3.0里程碑后开始发生。
This starts happening after upgrade to 1.3.0 Milestones.
Spring Tool Suite
版本:3.7.0.RELEASE
Build Id:201506290649
平台:Eclipse Luna SR2(4.4.2)
Spring Tool Suite Version: 3.7.0.RELEASE Build Id: 201506290649 Platform: Eclipse Luna SR2 (4.4.2)
推荐答案
遗憾的是,这是一个新的 spring-boot-devtools
模块的已知问题(请参阅 https://github.com/spring-projects/spring-boot/issues/3100 )。我们使用这个技巧来杀死主线程,以便我们可以用可重新加载的版本替换它。到目前为止,我还没有找到一种方法来防止调试断点被触发。
This is unfortunately a know issue with the new spring-boot-devtools
module (see https://github.com/spring-projects/spring-boot/issues/3100). We use this trick to kill the main thread so that we can replace it with a re-loadable version. So far I've not found a way to prevent the debug breakpoint from triggering.
现在,您可以在Java中切换暂停执行未捕获的异常复选框 - >调试首选项以防止它发生。
For now, you can toggle the "suspend execution on uncaught exceptions" checkbox in Java -> Debug preferences to prevent it from happening.
这篇关于Breakpoint at“throw new SilentExitException()”在Eclipse + Spring Boot中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!