Skip to content

README: split the notebook debugging bullets into a "Debug a notebook cell" section - #175

Merged
jgfoster merged 3 commits into
mainfrom
taz/readme-debug-notebook-cell
Oct 28, 2026
Merged

jgfoster merged 3 commits into
mainfrom
taz/readme-debug-notebook-cell

Conversation

@taz-mon

@taz-mon taz-mon commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

I noticed two bullets under Notebooks (breakpoint() and Inspect) were about 1,000 words in two paragraphs. They looked out of place and either formatted wrong or dumped in by an AI agent unconcerned with formatting. This PR moves the content with specific context into their own section, Debug a notebook cell, with shorter, human-readable sections:

  • Pause
  • Look at what the cell has
  • Change a value
  • Run code at the pause
  • Commands that start with %
  • Persisted Objects
  • Save a paused stack
  • Inspect an object

The rest of Notebooks section stays as it was. A new line in the Reference list (Debug a notebook cell) links to the section. The wording is written for someone new to the debugger: each term is explained where it first appears, and menu names say where to click.

Checked on a VM

Ubuntu 26.04 with a fresh install of GemDB Code 1.9.0. Corrections the test made to the old text:

  • Functions sit under function variables, and imported modules under module variables. The old text said classes and functions were "folded into their own rows".
  • Locals appears only when the pause is inside a function. A top-level cell shows only Globals.
  • Set Value leaves the cell paused, and Continue uses the new value.
  • The Persisted Objects view needs Refresh after a Revert to Committed Value.

Added because the README did not say it:

  • persisted lists the persisted names.
  • %pending also counts a few records that Grail keeps outside gemdb.root.
  • Remove from Persisted Objects.
  • Abort discards all of a notebook's uncommitted changes.
  • Revert asks you to confirm.
  • Restore a Saved Stack… and Open Saved Stack in the Debugger.
  • Dive Here, and the three Evaluate buttons (Display It, Execute It, Inspect It).

Tested in a VM

I ran the steps in the new section on an Ubuntu VM with GemDB Code 1.9.0: pausing and looking at values, Set Value, the Debug Console and the % commands, Persisted Objects (including Revert, Go to Item and ranges), saving and reopening a stack, and the Inspector (opening it from Variables, Watch, Persisted Objects and %inspect; the Attributes, Items, Repr, Class and Evaluate tabs, including paging past 100 items, the jump box and the MRO, Docstring and Methods sub-tabs; Edit Value, Dive Here, back and forward, and the busy-notebook message; and Evaluate on a committed entry). A committed entry and a saved stack both reopen after VS Code is closed and reopened.

I did not run this:

  • The macOS form of the Evaluate shortcuts (Cmd+K D, E and I). It comes from docs/inspector.md.

Questions for Eric:

  • Should Revert to Committed Value refresh the Persisted Objects view by itself? It showed the reverted change until ↻ was clicked.
  • The Pending changes group says “Nothing of yours changes on commit.” when the only pending items are Grail’s own records or values written back unchanged (src/savedObjects.ts). The message is meant to reassure, but the wording is odd and might sound like it was written by an AI. It would be great if a future commit improved that phrase.
  • The debug toolbar shows step buttons while the README says stepping is not supported. Should it?

🤖 Generated with Claude Code

… cell" section

The first two Notebooks bullets (breakpoint() and Inspect) were about 1,000 words
in two paragraphs. Move them into their own section with short parts: pause,
look at what the cell has, change a value, run code at the pause, commands that
start with %, Persisted Objects, save a paused stack, and inspect an object.

Checked on a clean Ubuntu 26.04 VM with GemDB Code 1.9.0. Corrections from that
test: functions sit under "function variables" and imported modules under
"module variables"; Locals appears only when the pause is inside a function;
Set Value leaves the cell paused and Continue uses the new value; the Pending
changes view needs Refresh after a Revert. Added what the README did not say:
the persisted name, Remove from Persisted Objects, Abort's scope, the Revert
confirmation, Restore a Saved Stack, Dive Here, and the Evaluate buttons.

Not run on the VM, kept from the previous text: Inspect from a Watch row, back
and forward in the Inspector, the Inspector while the notebook is busy, the
Repr tab when str() differs, and a committed entry opening after VS Code is
closed and reopened.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Inspector's message while a cell is running reads "Its session is running
something (a notebook cell, say). Refresh once it finishes." Say that in the
README instead of "the Inspector says so".

Checked on the VM on 2026-10-22: with an Inspector open and a 60-second
time.sleep cell running, clicking the refresh button showed that message, and it
cleared once the cell finished.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@ericwinger ericwinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually read this like a real human and found some nitty stuff with one possible thing that could be rewritten. But it's pretty good as is.

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Eric's review of #175:
- Reword the sentence about red dots and breakpoint() outside a notebook, and say
  what The `gemdb` command section covers.
- Drop "the notebook's transaction": say a change stays uncommitted until you
  commit, in the Debug Console bullet and in Set Value.
- Remove from Persisted Objects gets its own paragraph and covers committed
  entries too (it deletes the entry and commits the removal at once).
- Long lists: a list over 250,000 items opens to ranges of 250,000 first, each of
  which opens to ranges of 500. Checked on the VM with a 300,000-item list; the
  200-entry rule for gemdb.root checked with 258 entries.
- The Inspector opens in its own tab, which holds a strip of columns.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jgfoster
jgfoster merged commit 34a20e3 into main Oct 28, 2026
5 checks passed
@jgfoster
jgfoster deleted the taz/readme-debug-notebook-cell branch October 28, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants