How to access Exception Breakpoints panel

Hi

I'm developing plugin for IntelliJ and want to know how can I access the Exception Breakpoints panel and change its properties programatically.


Screen Shot 2014-04-23 at 11.34.59 AM.png

8 comments

Hi, unfortunately there is no API for current breakpoints panels modification. What exactly are you trying to achieve?

0

Hi Egor,

What I need is to enable Exception Breakpoints for uncaught exceptions ny default.

0

Do you mean you want all new exception breakpoints to have "uncaught exceptions" checked and "caught exceptions" unchecked?

0

yes, I want the debugger to stop at any uncaught exception

0

I'm not sure I understand what you need :(
Debugger stops at any uncaught exception with the configuration from the screenshot, doesn't it?

0

yeah it does but I need to do it myself, instead I have a button in the toolbar inside my plugin that set some defaults and I want to include this setting in the same action (programatically)

0

There is no way to acces the panel, but you can access breakpoint itself. It has changed slightly in 13.1:
after 13.1:

 
JavaExceptionBreakpointType breakpointType = XBreakpointType.EXTENSION_POINT_NAME.findExtension(JavaExceptionBreakpointType.class);

 
XBreakpoint<JavaExceptionBreakpointProperties> breakpoint = XDebuggerManager.getInstance(project).getBreakpointManager().getDefaultBreakpoint(breakpointType);

JavaExceptionBreakpointProperties properties = breakpoint.getProperties();

properties.NOTIFY_CAUGHT=false;
properties.NOTIFY_UNCAUGHT=true;
 
breakpoint.setEnabled(true);


before 13.1:

 
AnyExceptionBreakpoint breakpoint = DebuggerManagerEx.getInstanceEx(project).getBreakpointManager().getAnyExceptionBreakpoint();
 
breakpoint.NOTIFY_CAUGHT = false;
 
breakpoint.NOTIFY_UNCAUGHT = false;
 
breakpoint.setEnabled(true);

0

Hi Egor,
Thanks a lot for your help :)

I just couldn't find setEnabled(true) method but instead i used  breakpoint.ENABLED = true;

0

Please sign in to leave a comment.