Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Phar Lap ETS DebuggerNew to Visual Studio Code? Get it now.
Phar Lap ETS Debugger

Phar Lap ETS Debugger

JMRibault-Perso

| (0) | Free
Source debugging for Phar Lap ETS targets using locally installed vendor DLLs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Phar Lap ETS Debugger for VS Code

Source-level debugging for 32-bit Phar Lap ETS targets from VS Code on Windows.

The extension provides the debugger adapter and native bridge helper. It does not include Phar Lap ETS software or vendor DLLs; those must already be installed and licensed on the development PC.

What it supports

  • Open a local PE/NB11 executable and its recorded source paths.
  • Launch through the original ETS vendor loader and native signature/download dialogs.
  • Inspect a stopped target or run a bounded debug session.
  • Source, function, and instruction breakpoints.
  • Continue, Pause, step in, step over, and step out.
  • Stack traces, registers, scalar/pointer locals, supported aggregate expansion, watches, and hover values.
  • Flat memory viewing and explicitly enabled, range-checked memory/local writes.
  • Run to Cursor and optional Set Next Statement.
  • Thread metadata, per-thread stack/context inspection, and explicit thread control requests.
  • VGA text-screen capture, exception data, selector/descriptor inspection, and bounded low-level diagnostics.
  • Image download/reload through the vendor dialog with visible progress.

This is a practical ETS debugger, but it is not a claim of complete VS6, Win32 debug API, or hardware-model parity. See Limitations before using it.

Requirements

Required

  • Windows.
  • VS Code 1.85 or newer.
  • Python 3 available through python, py, or an explicit path.
  • A locally installed Phar Lap ETS toolset containing the required 32-bit vendor files.
  • A local target executable with valid NB11 debug symbols.
  • An authorized serial or parallel connection to the target.

The normal ETS vendor bin directory must contain at least:

  • etsreg.dll
  • rdilib32.dll
  • hstcom32.dll
  • etsdebug.dll
  • Their installed companion ETS vendor files.

The extension does not ship, copy, register, or modify these files.

Validated transport

COM1-COM4 are supported by the current transport configuration. COM4 has the strongest live validation history. LPT1-LPT3 can be configured, but require a compatible vendor I/O driver and remain unverified on modern 64-bit Windows.

Install

  1. Open Extensions in VS Code.
  2. Open the More Actions menu.
  3. Select Install from VSIX....
  4. Select ets-debug-bridge-x.y.z.vsix.
  5. Reload VS Code if requested.

For source builds, run npm run package in vscode-extension. The package step builds a VSIX containing only:

  • EtsConfigHost.exe
  • ets_dap.py
  • ets_debug.py
  • The extension UI and documentation.

Vendor DLLs and target application files are excluded.

Configure local dependencies

Run ETS: Configure local dependencies from the Command Palette.

Choose:

  1. Select Phar Lap ETS bin directory and select the directory containing the vendor DLLs.
  2. Select Python executable if python is not already correct on PATH.

The default vendor directory is:

C:\Tools\ETS\bin

Equivalent VS Code settings are:

{
  "ets.vendorDirectory": "C:\\Tools\\ETS\\bin",
  "ets.pythonPath": "python"
}

These settings are machine-specific and should not be committed with source. An optional ets.bridgeDirectory setting is intended only for extension/backend development; leave it empty for a normal VSIX installation.

Open an ETS source project

Open the folder containing the target source and its build files.

The extension detects ETS projects by scanning .mak and .MAK files for Phar Lap/ETS markers such as 386link, linkloc, dilintf.h, or an ETS include path. It does not depend on any particular product, executable, company, or source filename.

If no recognized makefile is found, ETS configuration snippets are not offered automatically. An explicit "type": "ets" entry in launch.json can still be used for a nonstandard project layout.

Create a launch configuration

In Run and Debug, create or edit .vscode\launch.json. The normal configuration is:

{
  "type": "ets",
  "request": "launch",
  "name": "ETS: Launch and debug",
  "mode": "boundedDebug",
  "vendorBackend": true,
  "download": false,
  "image": "C:\\work\\build\\target.exe",
  "port": "COM4",
  "sourceFileMap": {
    "C:\\build-tree\\source": "${workspaceFolder}"
  }
}

Required fields:

Field Meaning
image Absolute path to the local PE executable containing NB11 symbols.
mode inspectStopped for read-only stopped inspection, or boundedDebug for execution and breakpoints.
port COM1-COM4, or an unverified LPT1-LPT3 configuration.
sourceFileMap Maps source paths recorded in NB11 symbols to the current local checkout.

For the normal vendor workflow:

  • Keep vendorBackend: true.
  • Keep download: false.
  • The vendor loader compares the selected image with the target and presents its normal keep-existing/download choice.

The two choices are intentional:

  • download: false means "let the vendor signature/mismatch dialog decide."
  • download: true requests an explicit reset/download and requires a modal VS Code confirmation. It is intended for controlled reload scenarios.

The vendor directory can be set per configuration with vendorDirectory, but a global VS Code setting is preferable.

Optional build task

Add a normal VS Code preLaunchTask to build the target before launch:

{
  "type": "ets",
  "request": "launch",
  "name": "ETS: Build, launch and debug",
  "preLaunchTask": "Target: build debug image (no deploy)",
  "mode": "boundedDebug",
  "vendorBackend": true,
  "download": false,
  "image": "C:\\work\\build\\target.exe",
  "port": "COM4"
}

Use a build target that does not deploy or copy binaries unexpectedly. The debugger does not infer a product build command.

First debug session

  1. Confirm the target port is not owned by another terminal or debugger.
  2. Confirm the ETS monitor and target are ready.
  3. Confirm the selected local image corresponds to the target.
  4. Select ETS: Launch and debug.
  5. Press F5.
  6. Complete the vendor image/signature dialog if shown.
  7. Set source breakpoints after the target session is initialized.
  8. Use Continue or wait for a configured breakpoint.

For an already stopped target, use:

{
  "type": "ets",
  "request": "attach",
  "name": "ETS: Inspect stopped target",
  "mode": "inspectStopped",
  "image": "C:\\work\\build\\target.exe",
  "port": "COM4"
}

inspectStopped is read-oriented and does not run the target.

Debugging features

The standard VS Code controls are used where possible:

  • Toggle source breakpoints in the editor.
  • Use Continue, Pause, Step Into, Step Over, and Step Out.
  • Select threads and frames in CALL STACK.
  • Inspect Locals, Watches, and Registers.
  • Hover supported values.
  • Open memory through a variable memory reference or the VS Code memory viewer.

Commands

The Command Palette includes:

  • ETS: Configure local dependencies
  • ETS: Read target VGA screen
  • ETS: Run to Cursor
  • ETS: Set Next Statement

$screen can also be evaluated in the Debug Console when an ETS session is active.

Optional controls

Continue until Pause

"continueUntilPause": true

Runs successive bounded execution slices until a breakpoint, exception, Pause, disconnect, or stop condition occurs.

Set Next Statement

"enableSetNextStatement": true

This is deliberately opt-in. It changes EIP without executing intervening code. The operation is restricted to validated straight-line locations and requires confirmation.

Memory and variable writes

Disabled by default:

{
  "enableMemoryWrites": true,
  "memoryWriteRanges": [
    {
      "start": "0x00480000",
      "end": "0x00481000"
    }
  ]
}

Raw memory writes require a complete allowed range. Executable overlaps are refused. Writes can alter application behavior and are not available in inspectStopped.

Stop on entry

For launch configurations:

"stopOnEntry": true

Stops after loader entry instead of automatically continuing.

Recovery records and safety

Interruptions can leave one of these persistent records in VS Code extension storage:

  • EtsPendingBreakpoint.bin
  • EtsPendingDownload.bin
  • EtsPendingDownloadProbe.bin

The extension blocks a new session when a relevant record exists.

Do not delete a recovery record merely to continue:

  1. Preserve the record and any referenced snapshot.
  2. Verify the target is stopped and inspect its state.
  3. Follow the diagnostic/recovery procedure described in the bridge documentation.
  4. Reboot the target only if discarding the current application state is acceptable.
  5. Archive the unchanged record and matching snapshot before retrying.

Only one debugger helper may own the selected target port. Do not run the debugger CLI, another VS Code session, or another terminal program against the same port while a debug session is active.

Never use an industrial or safety-critical target without its operational authorization and established recovery procedure.

Troubleshooting

ETS configurations do not appear

Open the target's source/build workspace and verify it contains an ETS-style makefile. The extension checks .mak files for multiple Phar Lap/ETS build markers.

Vendor DLL is missing

Run ETS: Configure local dependencies and select the installed ETS bin directory. Do not copy vendor files into the VSIX or project workspace.

Source files are not resolved

Update sourceFileMap. Its key must match the absolute source directory recorded in the executable's NB11 symbols.

Python or adapter startup fails

Select the correct Python executable using ETS: Configure local dependencies. Confirm that the bundled runtime\ets_dap.py exists in the installed extension.

Communications error or vendor retry dialog

Close any other process using the configured port. Ensure the ETS monitor is ready, then end and restart the VS Code debug session. Do not start a second helper to compete for the port.

Download or stepping becomes uncertain

Preserve recovery records and stop debugging. Do not assume repeated requests are safe; inspect the target first.

Limitations

  • The debugger uses bounded execution and validated stepping; it is not a full-speed all-thread, all-instruction emulator.
  • Single-thread-only execution is not supported.
  • Optimized/FPO stack frames, unsupported instructions, far calls, some prefixes, and ambiguous source locations may stop with an explicit reason.
  • Thread enumeration is bounded because the installed vendor interface exposes no general next-thread operation.
  • Conditional breakpoints, hit counts, logpoints, and all-thread breakpoint fidelity are not established.
  • LPT transport and vendor driver compatibility remain unverified.
  • Several compatibility-layer _ETS* exports are intentionally rejected or represented through proven lower-level APIs.
  • Pointing at an executable proves only the local symbol/image mapping. It does not prove that source text is identical to the build-time source.
  • Hovering pointers can read target memory; an invalid pointer or device mapping can have side effects even during a read.

The bridge's technical inventory and API evidence are maintained in VENDOR_API.md in the source repository.

Vendor files and licensing

The extension is an independent debugger frontend. Phar Lap ETS vendor DLLs and SDK files are not open-source project deliverables and are not redistributed. Users must have an appropriate local installation and comply with its licensing terms.

Before publishing a marketplace build, set the publisher identity, license, privacy statement, and signed release policy for the extension itself.

Visual Studio 2019

A future Visual Studio 2019 extension should reuse this project's native helper, symbol engine, adapter logic, and recovery rules. The preferred design is a new Visual Studio frontend over the same backend, not a second debugger implementation.

Source and release

Repository: https://github.com/JMRibault-Perso/ETS-Support-for-modern-debugger

The technical repository README remains the developer reference for protocol, ABI, native build, loader, recovery, and test details. This document is the user-facing VS Code manual.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft