mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-19117 Debugger is extremely slow to start w/ Node.js 5.0.0
This commit is contained in:
@@ -256,15 +256,8 @@ abstract class DebugProcessImpl<C : VmConnection<*>>(session: XDebugSession,
|
||||
protected fun addChildVm(vm: Vm) {
|
||||
beforeInitBreakpoints(vm)
|
||||
|
||||
val breakpointManager = XDebuggerManager.getInstance(session.project).breakpointManager
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
for (breakpointHandler in breakpointHandlers) {
|
||||
if (breakpointHandler is LineBreakpointHandler) {
|
||||
val breakpoints = runReadAction { breakpointManager.getBreakpoints(breakpointHandler.breakpointTypeClass) }
|
||||
for (breakpoint in breakpoints) {
|
||||
breakpointHandler.manager.setBreakpoint(vm, breakpoint)
|
||||
}
|
||||
}
|
||||
processBreakpoints { handler, breakpoint ->
|
||||
handler.manager.setBreakpoint(vm, breakpoint)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,6 +269,18 @@ abstract class DebugProcessImpl<C : VmConnection<*>>(session: XDebugSession,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected inline fun processBreakpoints(processor: (handler: LineBreakpointHandler, breakpoint: XLineBreakpoint<*>) -> Unit) {
|
||||
val breakpointManager = XDebuggerManager.getInstance(session.project).breakpointManager
|
||||
for (breakpointHandler in breakpointHandlers) {
|
||||
if (breakpointHandler is LineBreakpointHandler) {
|
||||
val breakpoints = runReadAction { breakpointManager.getBreakpoints(breakpointHandler.breakpointTypeClass) }
|
||||
for (breakpoint in breakpoints) {
|
||||
processor(breakpointHandler, breakpoint)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
Reference in New Issue
Block a user