{"at":"2026-11-23T03:11:13.219Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:11:13.773Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:11:13.924Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:11:14.433Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"logging":{},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"chrome-debugger-mcp","version":"1.0.0"}}}}
{"at":"2026-11-23T03:11:14.433Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:11:14.433Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:11:14.466Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"CALL THIS FIRST whenever browser-side debugging is needed — before any other tool.\n\nAuto-trigger when user mentions any of:\n  debug, breakpoint, debugger, inspect, trace, step through, runtime value,\n  variable value, why is this, implement based on API response, bug, error,\n  unexpected behavior, not working, check this, confirm this.\n\nReturns the complete debugging workflow and critical rules.\nThe response contains a \"_ui\" field — relay it to the user verbatim.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"startDebuggingSession"},{"description":"[STEP 1] Launch a dedicated Chrome instance with remote debugging enabled (default port 9222).\nUses --user-data-dir=~/.chrome-debug-profile so your normal Chrome keeps running (dual-instance).\nAuto-detects if the debug port is already active and skips launch (alreadyRunning=true).\nUse dryRun=true to preview the command — show it to the user and ask for confirmation before executing.\nSet openDevTools=true to automatically open DevTools panel for every new tab.\nIf automatic launch does not succeed, relay the returned command to the user and ask them to run it manually.\nRelay the \"_ui\" field from the response to the user.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"chromePath":{"description":"Chrome executable path. Overrides platform defaults and CHROME_PATH/GOOGLE_CHROME_BIN.","type":"string"},"dryRun":{"description":"If true, return the launch command without executing it","type":"boolean"},"openDevTools":{"description":"If true, adds --auto-open-devtools-for-tabs so DevTools opens automatically for every new tab","type":"boolean"},"port":{"description":"Remote debugging port (default 9222)","exclusiveMinimum":0,"type":"integer"},"url":{"description":"URL to open immediately after launch","type":"string"},"userDataDir":{"description":"Profile directory for the debug instance (default ~/.chrome-debug-profile)","type":"string"}},"type":"object"},"name":"launchChrome"},{"description":"[STEP 2] List all open Chrome tabs available for debugging.\nMANDATORY: show the full list to the user and ask \"Which URL do you want to debug?\"\nNEVER skip this step, NEVER guess — even if only one tab is open.\nWait for the user's explicit reply before proceeding to connect().\nRelay the \"_ui\" field from the response to the user.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"port":{"description":"Chrome remote debugging port (default 9222)","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"listTargets"},{"description":"[STEP 3] Connect the debugger to a specific Chrome tab.\nMANDATORY: call listTargets first, show the list to the user, wait for their explicit URL confirmation, then call this.\nNEVER guess the URL. NEVER skip user confirmation — even if only one tab is visible.\ntargetUrl must be a unique substring of the tab URL the user confirmed (e.g. \"localhost:5173\").\nRelay the \"_ui\" field from the response to the user.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"port":{"description":"Chrome remote debugging port (default 9222)","exclusiveMinimum":0,"type":"integer"},"targetUrl":{"description":"Unique substring of the tab URL confirmed by the user (e.g. 'localhost:5173'). REQUIRED — always obtain from user confirmation.","type":"string"}},"required":["targetUrl"],"type":"object"},"name":"connect"},{"description":"Disconnect the current Chrome debugging session and clear in-memory pause state. Use this to explicitly end a debug session before connecting again.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"disconnect"},{"description":"Set a breakpoint at a specific script URL and line number via CDP — no source code modification needed.\n  Use a full URL (https://...) for exact match, or a partial filename/keyword for regex match.\n  Alternative to inserting debugger; when you cannot modify the source file.\n  After setting, call reloadPage() to ensure the breakpoint resolves correctly.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"column":{"description":"0-based column number","minimum":0,"type":"integer"},"condition":{"description":"Conditional breakpoint expression","type":"string"},"line":{"description":"0-based line number","minimum":0,"type":"integer"},"url":{"description":"Script URL or URL pattern to match","type":"string"}},"required":["url","line"],"type":"object"},"name":"setBreakpoint"},{"description":"Remove a previously set CDP breakpoint by its ID (returned by setBreakpoint).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"breakpointId":{"description":"The breakpoint ID returned by setBreakpoint","type":"string"}},"required":["breakpointId"],"type":"object"},"name":"removeBreakpoint"},{"description":"[STEP 5b — FALLBACK] BLOCKING call — waits until ANY debugger pause occurs (breakpoint, debugger; statement, or exception).\n  Before blocking, sends a notification to the user to trigger the page action.\n  Must be called IMMEDIATELY after reloadPage() in the SAME AI turn — do NOT end your turn before calling this.\n  Prefer waitForSpecificPause when you know the exact file and line — it uses smarter two-tier matching.\n  Use this only when the target location is unknown or when setBreakpoint is used without a specific line.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"actionHint":{"description":"Optional hint to tell the user what action to perform on the page (e.g. 'click the button', 'submit the form').","type":"string"},"timeout":{"description":"Timeout in milliseconds (default 30000)","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"waitForPause"},{"description":"[STEP 5b — PREFERRED] BLOCKING call — waits for the next debugger pause, then checks if it matches the target location.\n  \n  ⚠️ NO AUTO-RESUME: execution stays paused after this returns, regardless of matched value.\n  You decide what to do based on the \"matched\" field in the response:\n    matched=true  → call getScopeVariables() immediately to read variables\n    matched=false → the wrong breakpoint fired; call resume() to continue,\n                    then call waitForSpecificPause() again if you need to wait for the next pause.\n  \n  Must be called IMMEDIATELY after reloadPage() in the SAME AI turn.\n  Before blocking, sends a notification to the user to trigger the page action.\n  Editor line N → pass line=N-1 (CDP uses 0-based line numbers).\n  Relay the \"_ui\" field from the response to the user once it returns.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"actionHint":{"description":"Describe the page action to trigger the breakpoint (e.g. 'click the Search button'). Shown in the waiting notification to the user.","type":"string"},"line":{"description":"0-based line number where debugger; was inserted. Editor line N → pass N-1.","minimum":0,"type":"integer"},"lineTolerance":{"description":"±line tolerance for Tier 1 matching (default 10). Increase to 20+ for heavily bundled code.","minimum":0,"type":"integer"},"timeout":{"description":"Timeout in ms to wait for any pause (default 90000). Increase for slow interactions.","exclusiveMinimum":0,"type":"integer"},"urlFragment":{"description":"Substring of the script URL where debugger; was added (e.g. 'LoginForm.vue', 'utils.ts'). Does NOT need to be the full URL.","type":"string"}},"required":["urlFragment","line"],"type":"object"},"name":"waitForSpecificPause"},{"description":"[STEP 6a] Read all scope variables (local, closure, module) at the currently paused call frame.\n  Call this immediately after waitForSpecificPause or waitForPause returns.\n  Results are grouped by scope type; global scope is skipped.\n  Use frameIndex=1, 2, ... to inspect variables in parent call frames up the stack.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"frameIndex":{"description":"Call frame index (default 0, the topmost frame)","minimum":0,"type":"integer"}},"type":"object"},"name":"getScopeVariables"},{"description":"[STEP 6b] Evaluate any JavaScript expression in the context of the currently paused call frame.\n  Use this to inspect nested objects, call methods, compute derived values, or verify conditions at runtime.\n  Complements getScopeVariables for values not directly visible in scope (e.g. this.state, JSON.stringify(obj)).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"expression":{"description":"JavaScript expression to evaluate","type":"string"},"frameIndex":{"description":"Call frame index (default 0)","minimum":0,"type":"integer"}},"required":["expression"],"type":"object"},"name":"evaluate"},{"description":"[STEP 8] Resume script execution after collecting all needed variable data — ends the current pause.\n  After calling resume, remove all temporary debugger; statements added to source code during this session.\n  Relay the \"_ui\" field from the response to the user.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"resume"},{"description":"[STEP 7] BLOCKING: step into the next function call, then wait until the debugger pauses again. Follow with getScopeVariables() to observe inner-function state.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"timeout":{"description":"Timeout in milliseconds to wait for the next pause (default 30000)","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"stepInto"},{"description":"[STEP 7] BLOCKING: step over the current statement without entering function calls, then wait until the debugger pauses again. Follow with getScopeVariables() to observe how local variables change.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"timeout":{"description":"Timeout in milliseconds to wait for the next pause (default 30000)","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"stepOver"},{"description":"[STEP 7] BLOCKING: step out of the current function and wait until the debugger pauses again in the caller. Use to observe the return value and the state of the calling context.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"timeout":{"description":"Timeout in milliseconds to wait for the next pause (default 30000)","exclusiveMinimum":0,"type":"integer"}},"type":"object"},"name":"stepOut"},{"description":"Non-blocking: return current connection and pause state immediately without waiting.\n  Use this to poll for pause instead of waitForPause when the MCP client has a short request timeout (e.g. MCP Inspector ~10s).\n  Returns: connected, paused, targetUrl, pauseReason, hitBreakpoints, callStack.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"getStatus"},{"description":"[STEP 5a] Reload the connected page via Chrome DevTools Protocol.\n  More reliable than manual browser refresh — maintains the CDP connection and ensures debugger; statements and setBreakpoint() calls resolve correctly when scripts reload.\n  Always call this after inserting debugger; in source code or after setBreakpoint(), before waitForSpecificPause/waitForPause.\n  \n  ⚠️ CRITICAL TURN RULE: After this tool returns, you MUST immediately call waitForSpecificPause (or waitForPause) in the SAME AI turn — do NOT end your turn here.\n  waitForSpecificPause is a blocking call that will notify the user to trigger the page action and wait for the breakpoint internally.\n  If you end your turn after reloadPage, the session will break.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"ignoreCache":{"description":"Hard reload ignoring cache (default false)","type":"boolean"}},"type":"object"},"name":"reloadPage"},{"description":"Force the debugger to pause at the very next JavaScript statement. Useful when you cannot modify source code to add debugger; and setBreakpoint is not feasible.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"forcePause"}]}}}
