All docs

Emulator & Debugger

Cycle-accurate Vectrex emulator, built-in debugger, breakpoints, memory inspector and AI assistant.

Vectrex Studio embeds a custom cycle-accurate emulator (JSVecX) directly in the IDE. No hardware needed — compile and run instantly.


Emulator Panel

After a successful build the ROM loads automatically and emulation starts. The panel displays:

  • Vector display — the actual Vectrex output, rendered with authentic beam visuals
  • CPU registers — PC, A, B, X, Y, U, S, DP, CC flags, updated live
  • Performance metrics — cycles per frame, FPS, total instruction count
  • Cycle utilization chart — bar chart with a danger zone indicator when the frame budget is exceeded

Controls

ButtonAction
PlayStart or resume emulation
PausePause emulation
ResetReset to startup state

Debugger

The debugger supports source-level debugging in VPy files (requires Buildtools backend with debug_symbols = true) or assembly-level debugging in .asm files.

Setting Breakpoints

Click in the gutter (left margin of the editor) on any line to toggle a breakpoint. Breakpoints are:

  • Persisted across sessions in SQLite
  • Mapped to ROM addresses via the .pdb debug symbol file
  • Supported in both .vpy and .asm files

Source-level breakpoints in .vpy files require the Buildtools backend. The Core backend does not generate PDB files.

Debug Controls

KeyAction
F5Continue (resume until next breakpoint)
F10Step Over
F11Step Into
Shift+F11Step Out

Debug Panels

PanelContent
DebugDEBUG_PRINT output and watched variables, updated every 100ms
TraceInstruction-level execution trace (when enabled)
MemoryRAM inspector — raw bytes or grid view
BIOS CallsMonitor which Vectrex BIOS routines are called and how often
PSG LogAY-3-8910 register writes, tone/noise values

Reading memory from VPy

DEBUG_PRINT(player_x)       # prints value to Debug panel
DEBUG_PRINT_STR("score:")   # prints label

AI Assistant — PyPilot

PyPilot is the built-in generative AI assistant. It understands VPy, the Vectrex hardware, and can control the IDE directly via the MCP server.

Supported Providers

ProviderTypeNotes
OllamaLocal100% private, no API key, runs on your machine
Anthropic ClaudeCloudBest reasoning quality
OpenAICloudgpt-4o / gpt-4o-mini
Google GeminiCloud
DeepSeekCloudFree tier available
GitHub ModelsCloudRequires GitHub PAT
GroqCloudFast inference, free tier available

Local AI with Ollama

Run AI with zero cloud costs and full privacy:

brew install ollama
brew services start ollama
ollama pull qwen2.5:7b    # recommended model (~4.7 GB)

Then select Ollama (Local) in the PyPilot config panel. The IDE includes an Ollama Manager to download, switch, and delete models without leaving the app.

What PyPilot Can Do

  • Generate VPy code from a natural language description
  • Explain or refactor selected code
  • Suggest fixes for compiler errors
  • Create vector assets (.vec) and music assets (.vmus) directly
  • Trigger builds and inspect output
  • Add breakpoints and inspect emulator state — all via MCP

Slash Commands

CommandAction
/generate [description]Generate VPy code
/explainExplain the current or selected code
/fixSuggest fixes for current compiler errors
/optimizeOptimize selected code
/clearClear current session

MCP Server

The MCP server (ide/mcp-server/server.js) exposes the IDE on TCP port 9123, allowing any MCP-capable AI client (Claude, GitHub Copilot, etc.) to read code, trigger builds, inspect the emulator, and create assets.

The VS Code extension connects to the same MCP server, so you can use any AI assistant from VS Code with full access to the running IDE.