mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rd debugger] IJPL-211527 Do not remove a breakpoint until it's highlighter is initialized
GitOrigin-RevId: ad70e0abd57fdb317296b4a88c89c2dfdeb0dff1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0e519175ae
commit
da68b326d3
+15
-4
@@ -190,12 +190,23 @@ class XLineBreakpointManager(private val project: Project, coroutineScope: Corou
|
||||
|
||||
private fun cleanUpBreakpoints(document: Document) {
|
||||
val breakpoints = getDocumentBreakpointProxies(document)
|
||||
// Check if two or more breakpoints occurred at the same position and remove duplicates.
|
||||
val (valid, invalid) = breakpoints.partition {
|
||||
val highlighter = it.getHighlighter()
|
||||
highlighter != null && highlighter.isValid
|
||||
val valid = mutableListOf<XLineBreakpointProxy>()
|
||||
val invalid = mutableListOf<XLineBreakpointProxy>()
|
||||
for (breakpoint in breakpoints) {
|
||||
val highlighter = breakpoint.getHighlighter()
|
||||
if (highlighter == null) {
|
||||
// Breakpoint is uninitialized yet
|
||||
continue
|
||||
}
|
||||
if (highlighter.isValid) {
|
||||
valid.add(breakpoint)
|
||||
}
|
||||
else {
|
||||
invalid.add(breakpoint)
|
||||
}
|
||||
}
|
||||
removeBreakpoints(invalid)
|
||||
// Check if two or more breakpoints occurred at the same position and remove duplicates.
|
||||
val areInlineBreakpoints = XDebuggerUtil.areInlineBreakpointsEnabled(FileDocumentManager.getInstance().getFile(document))
|
||||
val duplicates = valid
|
||||
.groupBy { b ->
|
||||
|
||||
Reference in New Issue
Block a user