MCPcopy Index your code
hub / github.com/ScriptedAlchemy/devtools-debugger-mcp / makeCounter

Function makeCounter

tests/fixtures/advanced-script.js:4–15  ·  view source on GitHub ↗
(start)

Source from the content-addressed store, hash-verified

2console.log('begin');
3
4function makeCounter(start) {
5 let count = start;
6 const meta = { tag: 'C', list: [1, 2], nested: { a: 1 } };
7 return function inc(step) {
8 const s = step ?? 1;
9 const before = count;
10 count += s;
11 console.log('inc', { before, s, count, metaTag: meta.tag });
12 debugger; // pause inside closure with locals + closure vars
13 return count;
14 };
15}
16
17class Calc {
18 constructor(mult) {

Callers 1

advanced-script.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected