Back to VS Code home
A Ballerina notebook is a canvas, which combines Markdown text and executable Ballerina source code. Markdown and Ballerina code snippets are supported by Ballerina notebook cells.
Info: Make sure your VS Code version is
1.67.0
or higher when using Ballerina notebooks.
Create a notebook
You can create Ballerina notebooks in the VS Code editor (by adding the .balnotebook
extension for file names) via the Command Palette of the VS Code editor as shown below.
Execute the code
Click the Run button available on the left-hand side of the cell to execute the Notebook cells.
Alternatively, you can use the Shift
+ Enter
keyboard shortcut to execute the cells.
Tip: Additionally, the
Run All
,Execute Above Cells
,Execute Cell and Below
,Clear outputs of All Cells
, andRestart Notebook
actions are available in the user interface.
Edit the code
You can use the IntelliSense features to edit the code on notebooks as shown below.
View variables
You can view variables in notebooks as shown below.
Debug notebooks
Use the provided option to debug Ballerina notebooks as shown below.
Tip: You need to enable the debug mode via the VS Code extension settings as shown below.