Plugin - breakpoint highlighter

Answered

Hi,

I work on a plugin that saves project state in matter of set breakpoints and opened editors. When you e.g. switch to another Git branch, editor tabs and breakpoints set up appropriately.

Recently, I'm able to read all breakpoint and set a new one programatically, even when it's in a lambda expression. However, when I set one in the lambda, whole line is highlighted although only the lamda code should be marked.

So my question is how to create a lambda-breakpoint properly so that it's highlighted correctly?

AFAIK, a breakpoint could be set with one of the following way:
XDebuggerManager.getInstance(project).breakpointManager.addLineBreakpoint(...)
XDebuggerUtil.getInstance().toggleLineBreakpoint(
XDebuggerUtilImpl.toggleAndReturnLineBreakpoint(

Thanks in advance,

Zdenek

0
1 comment

Similar feature already exists in IDE: https://youtrack.jetbrains.com/issue/IDEA-69150

Probably, you can use its implementation as a reference.
https://github.com/JetBrains/intellij-community/blob/master/platform/tasks-platform-impl/src/com/intellij/tasks/context/XDebuggerBreakpointsContextProvider.java

Or fill an issue/send a PR to update it, instead of writing a separate plugin.


0

Please sign in to leave a comment.