Skip to content

Debugger

Henri edited this page Feb 4, 2024 · 2 revisions

How to inject

When debugging complex applications, you can create a Debugger from your app that you can inject in your browser console.

import { Debugger } from "@scv/cells";

// point to your app main Sheet
const debug = new Debugger(sheet);
window["debug"] = debug;

// you can also add a shortcut to print
window["p"] = (cell: number) => debug.p(cell);

Then, use debug.[command] in the console.

Commands

h         -- this help
w(id...)  -- watch cells
aw(name)  -- auto-watch cells with matching name
uw(id...) -- unwatch cells
p(id)     -- print a cell and its deps
s("...")  -- search cell names
e         -- show all cell errors
u         -- show all undefined cells
dot       -- generate graphviz dot graph
Clone this wiki locally