开发者

Break when exception is thrown

开发者 https://www.devze.com 2023-01-04 01:53 出处:网络
Visual Studio has an option to break开发者_StackOverflow automatically into the debugger when an unhandled exception is thrown, does Eclipse have similar functionality?You are able to define the preci

Visual Studio has an option to break开发者_StackOverflow automatically into the debugger when an unhandled exception is thrown, does Eclipse have similar functionality?


You are able to define the precise list of Exception you want to have a breakpoint on, even if those exceptions are uncaught (which should be the equivalent of "unhandled")

Break when exception is thrown


Go to the breakpoints window, there's a button that looks like J!, there you can set breakpoints for Java exceptions, either caught or uncaught. You can reference classes or use pattern matchers for exception names.

Also, under Window -> Preferences, Select Java -> Debug and there's a checkbox to tell the debugger to break on uncaught exceptions

0

精彩评论

暂无评论...
验证码 换一张
取 消