Skip to content

Configuration

Customize ParrotJS behavior with settings, profiles, run modes, and execution safety options.

ParrotJS works out of the box, but you can customize it via VS Code settings and project-level configuration. All settings live under the parrotjs.* namespace in your .vscode/settings.json or VS Code user settings.

Settings Reference

Setting Type Default Description
parrotjs.executionDelay number 300 Delay in milliseconds before executing code after you stop typing (min 100, max 2000)
parrotjs.maxExecutionTime number 5000 Maximum execution time in milliseconds before the run is terminated
parrotjs.runMode string automatic automatic (as you type), onSave, or onDemand
parrotjs.autoStart boolean true Automatically start ParrotJS when opening JS/TS files
parrotjs.autoLog boolean true Automatically capture and display all expression values inline (PRO)
parrotjs.logLimit number 100 Maximum number of captures per line before throttling in auto-log mode
parrotjs.showInlineValues boolean true Show runtime values inline
parrotjs.showConsoleOutput boolean true Show console.log output
parrotjs.showConsoleInline boolean true Show console output inline at the call site
parrotjs.showCoverage boolean true Show execution coverage indicators in the gutter (PRO)
parrotjs.includeNodeModules boolean false Allow importing from node_modules
parrotjs.watchDependencies boolean true Watch imported files and re-execute on changes
parrotjs.maxInlineLength number 80 Maximum characters for inline value display before truncation
parrotjs.maxObjectDepth number 3 Maximum object nesting depth shown inline (deeper levels show as {…})
parrotjs.profile string node Active configuration profile: node, react, or vanilla

Run Mode

Set the default run mode. Can be overridden from the status bar at any time.

// .vscode/settings.json
{
  "parrotjs.runMode": "automatic" // "automatic" | "onSave" | "onDemand"
}
Mode Behavior
automatic Executes as you type, debounced by parrotjs.executionDelay
onSave Executes only when you save the file
onDemand Executes only when you run ParrotJS: Re-execute

Configuration Profiles

Pre-configured profiles for common project types. Set with parrotjs.profile or the ParrotJS: Switch Profile command.

Setting node react vanilla
executionDelay 300 500 200
includeNodeModules false true false
maxExecutionTime 5000 10000 3000
maxInlineLength 80 80 80
maxObjectDepth 3 2 3

Auto-Start

Control whether ParrotJS starts automatically when you open a supported file.

{
  "parrotjs.autoStart": true
}

Dependency Watching

ParrotJS automatically re-executes when an imported file changes:

{
  "parrotjs.watchDependencies": true
}

Execution Safety

ParrotJS runs your code in a process-isolated sandbox. Configure the safety limits:

{
  "parrotjs.maxExecutionTime": 5000, // ms, default 5s
  "parrotjs.includeNodeModules": false
}
  • Process isolation β€” each file runs in a forked Node.js child process using vm.runInContext(). User code can’t crash the IDE.
  • Execution timeout β€” long-running or infinite-looping code is automatically terminated after parrotjs.maxExecutionTime.
  • Health monitoring β€” the runner process is pinged periodically; if it stops responding it’s restarted automatically.

Theme Adaptation

Time travel color palettes and inline decorations automatically adapt to your VS Code theme (light/dark).