feat(notebook): link statement debugger from view
Expose /debug and /api/debug/* on the live view server; add a notebook Debug button so Marqdo statement stepping is reachable from the same page/session as cell stepping.
This commit is contained in:
1 parent
9873df7099
commit
0f2c12b636
5 files changed
+40
-4
No files matched your search
@@ -2844,6 +2844,7 @@ fn notebook_ui() -> &'static str {
|
||||
<button type="button" id="nb-state">State</button>
|
||||
<button type="button" id="nb-journal">Journal</button>
|
||||
<button type="button" id="nb-reload">Reload</button>
|
||||
<button type="button" id="nb-debug">Debug</button>
|
||||
<span id="nb-status">opening…</span>
|
||||
</div>
|
||||
<div class="notebook-bar" id="nb-state-actions" hidden>
|
||||
@@ -3026,6 +3027,9 @@ fn notebook_ui() -> &'static str {
|
||||
pre.textContent = JSON.stringify(r.journal || r, null, 2);
|
||||
});
|
||||
});
|
||||
bind("nb-debug", function () {
|
||||
window.open("/debug?path=" + encodeURIComponent(path), "_blank");
|
||||
});
|
||||
bind("nb-reload", function () {
|
||||
post("/api/session/reload", {}).then(function (r) {
|
||||
if (!r.ok) { status(r.error || "reload failed"); return; }
|
||||
@@ -3447,6 +3451,7 @@ mod tests {
|
||||
"nb-state",
|
||||
"nb-journal",
|
||||
"nb-reload",
|
||||
"nb-debug",
|
||||
"nb-kernel-input",
|
||||
"nb-push",
|
||||
"nb-pull",
|
||||
|
||||
Reference in new issue
Block a user