Skip to content

Add notebook debugging support for Ark#13205

Open
lionel- wants to merge 4 commits intomainfrom
feature/notebook-debugger
Open

Add notebook debugging support for Ark#13205
lionel- wants to merge 4 commits intomainfrom
feature/notebook-debugger

Conversation

@lionel-
Copy link
Copy Markdown
Contributor

@lionel- lionel- commented Apr 25, 2026

Addresses #12104
Backend-side at posit-dev/ark#1171

  • Enable debugging Ark notebooks via Jupyter.

  • Add a BreakpointSyncService to positron-runtime-debugger. This allows syncing breakpoints to Ark outside of debugging sessions, which is needed so we can inject breakpoints when executing cells before the "Debug Cell" action. This is needed because Ark injects breakpoints at parse-time. Without being able to inject them outside of debuggin sessions, users would need to go back and reexecute all cells after they click "Debug Cell", which is rather poor UX.

    The nice thing is that we'll be able to reuse that infrastructure for Console-mode Ark to update it with breakpoints outside of debug sessions too. And then go back to our previous debug sessions approach where the backend initiates a debug session when it detects a browser prompt. We had to switch to a new approach where the debug session is enabled at all time so Ark can receive breakpoints updates, which required patching up all context keys related to debug sessions. By using the Jupyter channel for Console-mode Ark, we'll be able to simplify all of that.

    This breakpoint sync service is opt-in, behing the supported_features flag proactive breakpoints. The space separation is consitent with kernel subshells from https://jupyter.org/enhancement-proposals/91-kernel-subshells/kernel-subshells.html.

  • For the same reason, we now send cellId as part of execute request metadata. This is not part of the Jupyter protocol but a convention established by JuyterLab and ipykernel. With the cellId, Ark is able to map breakpoints to the dumpCell tempfile. cc @jmcphers

Screen.Recording.2026-04-25.at.11.11.03.mov

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

@:notebooks
@:positron-notebooks

@lionel- lionel- requested review from DavisVaughan and seeM April 25, 2026 09:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 25, 2026

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:notebooks @:positron-notebooks

readme  valid tags

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.

1 participant