Get breakpoints

Answered

How get all active line breakpoints in com.intellij.openapi.actionSystem.AnAction#actionPerformed (for example) ?

 

0
6 comments

See com.intellij.xdebugger.breakpoints.XBreakpointManager

0
XBreakpointManager manager = XDebuggerManager.getInstance(currentProject).getBreakpointManager();
XLineBreakpointType type = XDebuggerUtil.getInstance().findBreakpointType(XLineBreakpointTypeBase.class);

if (type != null) {
Collection breakpoints = manager.getBreakpoints(type);
}

But breakpoints is null, also with ...

.findBreakpointType(XLineBreakpointType.class)
0

You can use XBreakpointManagerImpl.getAllBreakpoints and then filter by

getType() instanceof  XLineBreakpointType

2

.. or https://intellij-support.jetbrains.com/hc/en-us/community/posts/206115649-How-to-access-Exception-Breakpoints-panel?page=1#community_comment_206686679

What variant is better. I'm need "

com.jetbrains.cidr.execution.debugger.breakpoints.CidrLineBreakpointType

" in Clion

i suppose.

0

Yes, com.jetbrains.cidr.execution.debugger.breakpoints.CidrLineBreakpointType is correct

 

0

     Hi,all! I recently had the same problem. I don't know how to use the "Collection" type breakpoints. I want to know the number of lines where the break point is.

    hope your reply,thanks!

0

Please sign in to leave a comment.