PlusPim — MIPS Assembly Debugger for VS CodeA VS Code extension that integrates the PlusPim time-travel debugger for MIPS assembly code. Features
Requirements
InstallationInstall PlusPim for VS Code from the Visual Studio Marketplace. The Marketplace picks the VSIX for your platform. Getting Started
Using
|
| Property | Type | Default | Description |
|---|---|---|---|
program |
string[] |
["${file}"] |
Path to the MIPS assembly file(s). A single string or an array of paths, placed in that order. A relative path is resolved against cwd. |
cwd |
string |
${workspaceFolder} |
Absolute directory that relative paths in program are resolved against. Without it, every path in program must be absolute. |
stopOnEntry |
boolean |
true |
Stop at the first instruction. When false, the program runs until a breakpoint, an exception or the end. |
forceTerminalUtf8 |
boolean |
true |
Ask PlusPim to switch the terminal to UTF-8 while it runs and restore it on exit (currently effective on Windows only). Set to false to keep the terminal's own encoding. |
args |
string[] |
[] |
Extra arguments passed to PlusPim (e.g. ["--verbose"], ["--strict"], ["--no-delayed-branches"]). |
trace |
boolean |
false |
Show DAP protocol messages in the output channel. |
How It Works
When a debug session starts, the extension:
- Starts listening on a free loopback port chosen by the OS.
- Spawns the bundled
pluspimbinary in a VS Code terminal withdebug connect 127.0.0.1:<port>and the options. - Takes the first connection from PlusPim as the debug session, and PlusPim loads
programon thelaunchrequest. If PlusPim does not connect within 5 seconds, or exits before connecting, the session fails; see the terminal for details.
The program's standard input and output are the terminal itself, so you type input there and the output is written there as raw bytes. Non-ASCII output is shown correctly only if the terminal decodes it as UTF-8. By default the extension asks PlusPim to switch the terminal to UTF-8 while it runs (forceTerminalUtf8); if you turn that off, the terminal itself must decode UTF-8.
Known Limitations
- The terminal is closed by VS Code when PlusPim exits, so the program's output disappears when the session ends.
- On Windows, UTF-8 output is garbled when
forceTerminalUtf8isfalseand the console code page is not UTF-8 (for example Shift_JIS). The code page is restored when PlusPim exits, but not if PlusPim is killed forcibly. - Pseudo-instruction hints are only shown during a debug session, because the expansion needs the assembled program.
Development
Prerequisites:
- Bun 1.3 or later
- .NET 10 SDK
Run the following in clients/vscode:
bun install
bun run compile
bun run test runs the unit tests, bun run typecheck type-checks the sources, tests and scripts, and bun run ci runs the lint and format checks that CI runs.
| Command | Description |
|---|---|
bun run package:win32-x64 |
Publish the PlusPim binary for win-x64 and build a platform-specific VSIX. |
bun run package:linux-x64 |
Same for linux-x64. |
bun run package:darwin-x64 |
Same for osx-x64 (Intel Mac). |
bun run package:darwin-arm64 |
Same for osx-arm64 (Apple Silicon). |
bun run dotnet:publish:win |
Publish the win-x64 binary to bin/release only (no VSIX). |
bun run dotnet:publish:linux |
Publish the linux-x64 binary to bin/release only (no VSIX). |
bun run dotnet:publish:mac-x64 |
Publish the osx-x64 binary to bin/release only (no VSIX). |
bun run dotnet:publish:mac-arm64 |
Publish the osx-arm64 binary to bin/release only (no VSIX). |
bun run dotnet:debug:win |
Build a Debug binary to bin/debug (never included in a VSIX). |
The other targets (win32-arm64, linux-arm64, alpine-x64, alpine-arm64) have no script; run bun scripts/vsix.ts <target> directly. bun scripts/vsix.ts --publish-only <target> only publishes the binary, and bun scripts/vsix.ts --package-only <target> only builds the VSIX from the binary already in bin/release.
A VSIX bundles a single binary in bin/release, whatever the target. When bin/debug holds a binary, the extension launches it instead while being debugged in an Extension Development Host.
The publish settings live in src/PlusPim/PlusPim.csproj. win32-x64 and linux-x64 are compiled with Native AOT, which can only be published on the same OS, so publish them on Windows and Linux respectively. linux-x64 is published in an AlmaLinux 8 container by scripts/build/publish.sh to keep the glibc 2.28 requirement, so it needs Docker. The other targets are single-file, trimmed and ReadyToRun, and can be cross-published from another OS. The binaries are unsigned, so macOS may require xattr -d com.apple.quarantine on first run.
License
MIT