Playbooks Debugger extension for Visual Studio Code
A Visual Studio Code extension that supports debugging Playbooks programs. Playbooks Debugger provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging tasks.
Playbooks Language Support for Visual Studio Code
This extension provides comprehensive language support for Playbooks, including syntax highlighting, IntelliSense, debugging, and preview capabilities.
Usage
Once installed in Visual Studio Code, vscode-playbooks will be automatically activated when you open a Playbooks file (.pb or .pbasm). While .pb files are written in Playbooks language, .pbasm files are compiled Playbooks programs in the Playbooks Assembly Language format.
Debug Configurations
Launch Mode
Launch mode starts a new playbooks process with debugging enabled:
{
"type": "playbooks",
"request": "launch",
"name": "Debug Playbooks program",
"program": "${file}",
"stopOnEntry": true,
"console": "integratedTerminal",
"pythonPath": "/path/to/your/python",
"env": {
"PLAYBOOKS_DEBUG": "true",
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
Configuration Options:
type
: "playbooks"
request
: "launch"
name
: Name for the debug configuration
program
: Path to the Playbooks file to debug (.pb or .pbasm) to execute
stopOnEntry
: Whether to stop at the first line (default: false)
console
: Where to run the process:
"integratedTerminal"
: VS Code integrated terminal (default)
"externalTerminal"
: External terminal window
"internalConsole"
: VS Code debug console
pythonPath
: Path to Python interpreter (defaults to "python")
env
: Environment variables. ANTHROPIC_API_KEY is a required environment variable.
Playbooks File (.pb)
A program written in Playbooks language. When launching .pb
files, the extension will compile the file to a .pbasm
file and then launch the .pbasm
file.
Playbooks Assembly Language files (.pbasm)
When a set of Playbooks files are compiled, the output is a Playbooks Assembly Language Program (.pbasm file) in the Playbooks Assembly Language format. When launching .pbasm
files, the compilation step is skipped.
Requirements
- VS Code 1.74.0 or higher
- Python 3.10 or higher
- Playbooks package version 0.6.0 or higher
Plugin Development
To deploy a new version of the extension, run the following command:
vsce login playbooks-ai
vsce package
vsce publish
Release Notes
0.6.0
- Rebuild extension from scratch
- Compatible with Playbooks v0.6.x
- Add support for multiple agents as threads
0.5.0
- Rename Playbooks Common Language Specification (CLS) files (.pbc) to Playbooks Assembly Language files (.pbasm) to better reflect the language
0.4.0
- Use Python interpreter path to launch Playbooks programs
- Add ANTHROPIC_API_KEY environment variable in launch and attach configurations
- Improved launch and attach configurations
- Don't close temporary .pb editor when opening compiled .pbasm
0.3.0
- Include node_modules in the extension package
0.2.0
- Preview provider for Playbooks programs (.pb and .pbasm files)
0.1.0
- Fix bug in launch mode when using ${file} to debug file in editor
0.0.0
- Initial release of Playbooks Debugger extension for VS Code