Hi everyone,
This post announces an upcoming feature for the Julia VS Code extension: Inline Cell Debugging.
I’m sharing this Pull Request as an announcement because the core functionality is now complete, and a prebuilt VSIX package is available for immediate testing. This allows the community to try the feature easily and provide feedback before the final merge.
How to Try It
Links:
- Prebuilt Extension: Zipped julia-vscode VSIX
- Pull Request: julia-vscode#4011
Instructions:
- Install: Download and install the prebuilt VSIX package linked above. If you have persistent sessions enabled (e.g. via tmux), make sure to restart the REPL after installation.
- Manual Build (Optional): If you prefer to build from source, clone the PR branch and patch the
DebugAdapter.jlpackage as described in the PR. - Run: Start a Julia REPL, define some variables, and click the Debug CodeLens that appears above your code cells.
Demonstration
- Context Setup: Run
cell 0(x = 1). Then multi-selectcell 2andcell 4(Fig. 1). - Initiate Debugging: Run the Julia: Debug Code Cell command. The debugger inherits the
xvariable from the active REPL.
Note: Clicking the Debug CodeLens triggers debugging for a single cell only. - Step 1: The debugger enters the first selected cell and pauses at line 7. The value of
xupdates to 3 (Fig. 2). - Step 2: Click Continue. The debugger resumes execution, completes
cell 2, and breaks at line 13 incell 4, withxnow equal to 15 (Fig. 3).
What Is Inline Debugging?
Many users including me rely on the Execute Code Cell workflow to interactively build models and scripts. Until now, debugging these cells required running the entire file or manually managing execution state. This feature changes that by bringing the full power of the debugger directly into the interactive workflow.
Key Features
1. One-Click Debugging
A Debug button (CodeLens) now appears above every code cell, right next to Run. Clicking it instantly launches a debug session for that specific block of code.
2. Context Inheritance (REPL Awareness)
The debugger now inherits the state of the active REPL session. If a variable x is defined in the REPL, the debugger can access and use it. There is no longer a need to restart the session or load a clean environment just to debug a few lines of code.
3. Multi-Cell Support
Multiple cells can be multi-selected and run using the Julia: Debug Code Cell command, allowing users to step through several code blocks sequentially.
Requirements:
- Active REPL: At the moment, debugging cells requires an active REPL, but this may be relaxed or improved later.
Feedback on this new workflow is highly appreciated. Does this fit how you use code cells? Please share your thoughts and bug reports in the comments or on the PR!


