Repository navigation
Breaking changes
get_urlandget_titleare replaced byget_page_info, which returns{ url, title }. It answers even while the page is not responding.list_tabs: the field that marks the tab this server acts on is renamed fromactivetoconnected.activenow marks a tab showing on screen.- Positions in results are 1-based, for columns as well as lines, and name the script by
url. In 1.4.3,set_breakpointreturned Chrome's raw locations (scriptId, 0-based), and columns elsewhere were 0-based. get_console_logs: entries from before this server connected have notimestamp. In 1.4.3 they carried the time this server connected.
If your client allows tools by name, replace get_url and get_title with get_page_info, and add the new navigate_tab and reload_tab.
New
navigate_tabandreload_tabload a URL in the connected tab or reload it, and wait for the load event. If execution pauses first, they return the call stack instead. Both work while paused at a breakpoint.reload_tabcan bypass the HTTP cache withignoreCache.set_breakpointtakessource: a file path as in your project, such assrc/App.tsx, mapped through source maps. When that file changes, the breakpoint is dropped, and the next state or navigation result says so.resume_executiontakesterminate: trueto skip the rest of the paused code, e.g. to stop an endless loop.pause_executionwaits up to 2s and returns the call stack. If no script runs in that time, it says the pause is pending.evaluate_jsreturns the pause position at once when the expression hits a breakpoint. The rest of the expression runs after resume.get_console_logstakessince, to read only the current page load (current-page-load) or to leave out entries from before the connection (earlier-page-load). Entries from before the connection or from an earlier page load carry afrommarker.switch_tabsays when the tab it switched to is already paused.- Pause and step results name the breakpoint that was hit.
Fixes
- After a reload or navigation ends a pause, the debugger state no longer reports the old page's call stack. Chrome sends no
Debugger.resumedin that case. - A pause left pending on an idle page, by
pause_executionor by DevTools' pause button, no longer stops inside this server's own reads of the page. It waits for the page's own code. - Breakpoint IDs are issued by this server. Chrome names a breakpoint by its place, so a breakpoint set at the place of an earlier one got that one's ID.
remove_breakpointreturns an error for an unknown ID. - Attaching the debugger to a tab: calls made during an attach wait for it. An attach that gets no answer times out instead of hanging. A failed attach is undone, and the next call tries again.
switch_tabwith atargetIdthatlist_tabsdoes not return no longer switches tabs or drops the current connection.resume_executionreturns a clear error when execution is not paused.get_console_logskeeps entries in the order they arrived.- Time-out messages no longer name a breakpoint as a possible cause, since a page paused at a breakpoint still answers CDP commands.
Docs
- README, Limitations: breakpoints are not shared with DevTools, and DevTools' "Deactivate breakpoints" has no effect while this server debugs the tab.
Full changelog: v1.4.3...v2.0.0