让intellij挂在异常处,特别是出现null pointer的地方

1 在Intellij中设置java exception breakpoint

在调试模式下,run->view breakpoints

在java exception breakpoints->any exception->suspend all

2 快捷键

ctrl+shift+f8

一句话,要想要让intellij在出现异常时挂住出现异常的地方,就要设置java exception breakpoints。

原文地址:https://www.cnblogs.com/hustdc/p/9440145.html