MCPcopy Index your code
hub / github.com/nodejs/node / clearBreakpoint

Function clearBreakpoint

lib/internal/debugger/inspect_repl.js:851–871  ·  view source on GitHub ↗
(url, line)

Source from the content-addressed store, hash-verified

849 }
850
851 function clearBreakpoint(url, line) {
852 const breakpoint = ArrayPrototypeFind(knownBreakpoints, ({ location }) => {
853 if (!location) return false;
854 const script = knownScripts[location.scriptId];
855 if (!script) return false;
856 return (
857 StringPrototypeIncludes(script.url, url) &&
858 (location.lineNumber + 1) === line
859 );
860 });
861 if (!breakpoint) {
862 print(`Could not find breakpoint at ${url}:${line}`);
863 return PromiseResolve();
864 }
865 return PromisePrototypeThen(
866 Debugger.removeBreakpoint({ breakpointId: breakpoint.breakpointId }),
867 () => {
868 const idx = ArrayPrototypeIndexOf(knownBreakpoints, breakpoint);
869 ArrayPrototypeSplice(knownBreakpoints, idx, 1);
870 });
871 }
872
873 function restoreBreakpoints() {
874 const lastBreakpoints = ArrayPrototypeSplice(knownBreakpoints, 0);

Callers

nothing calls this directly

Calls 1

printFunction · 0.70

Tested by

no test coverage detected