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

Method setBreakPoint

deps/v8/test/debugger/test-api.js:116–126  ·  view source on GitHub ↗
(func, opt_line, opt_column, opt_condition)

Source from the content-addressed store, hash-verified

114
115 // Returns the resulting breakpoint id.
116 setBreakPoint(func, opt_line, opt_column, opt_condition) {
117 assertFalse(%FunctionIsAPIFunction(func));
118
119 const scriptid = %FunctionGetScriptId(func);
120 assertTrue(scriptid != -1);
121
122 const offset = %FunctionGetScriptSourcePosition(func);
123 const loc =
124 %ScriptLocationFromLine2(scriptid, opt_line, opt_column, offset);
125 return this.setBreakPointAtLocation(scriptid, loc, opt_condition);
126 }
127
128 clearBreakPoint(breakpoint) {
129 assertTrue(this.breakpoints.has(breakpoint));

Callers 15

mainFunction · 0.80
regress-1639-2.jsFile · 0.80
listenerFunction · 0.80
regress-2318.jsFile · 0.80
regress-5575-1.jsFile · 0.80
debug-optimize.jsFile · 0.80

Calls 3

assertFalseFunction · 0.50
assertTrueFunction · 0.50

Tested by

no test coverage detected