Skip to content

Releases: csm101/delphi-visual-studio-code-debugger

v0.2.4 - Delphi Win64 Debugger

Choose a tag to compare

@csm101 csm101 released this 22 Jul 18:48

Debug Delphi Win64 applications from VS Code, or from an AI agent over MCP.
No Delphi toolchain and no build step needed to install: the adapter, the MCP
server and the VS Code extension are all compiled and bundled.

This release focuses on expression-evaluation correctness — watches, hovers, and the evaluate box.

  • Same-named classes are now told apart deterministically. When two classes in different units share a bare name (e.g. a nested TFields versus Data.DB.TFields), the debugger picks the right one from the object's real VMT instance size, so members, counts and values come from the correct class instead of a look-alike.
  • Property getters return the right kind and size. A property's return type is resolved from its exact debug-info type id, so string, Variant, record and set getters are decoded correctly — no more a Variant shown as its raw type word, or a record read as a pointer.
  • A bare function that needs arguments is refused, not mis-called. Typing SomeFunc where SomeFunc takes parameters now reports requires N argument(s) instead of returning a garbage value from an unintended zero-argument call.
  • Set, record and floating-point returns are decoded correctly in both call paths, and string- and Variant-alias types are classified by kind rather than by name.
  • New read_memory / write_memory MCP tools for inspecting and patching debuggee memory.

All changes are covered by the automated suite (940+ tests).

Install

  1. Download delphi-win64-debugger-setup-v0.2.4.zip below and extract it anywhere.
  2. Run Setup.exe. It packages the extension into a .vsix and installs it
    through the VS Code CLI, updating any previous version in place, then offers
    to register the MCP debug server with Claude Code and VS Code.
  3. Reload VS Code.

Windows will warn you: these executables are not code-signed, so SmartScreen
shows "Windows protected your PC". Choose More info -> Run anyway, or build the
identical zip yourself from source with build_setup_zip.bat — a reasonable
preference for a debugger, which by nature attaches to other processes.

You will also want the Delphi IDE plugin:
it generates the workspace and launch configuration from your Delphi project,
which is otherwise a few hundred search paths to write by hand.

Requirements

  • Windows x64, VS Code 1.80 or later.

  • The program you want to debug must be compiled with full debug information,
    or most of this will not work — a debugger can only show what the compiler
    emitted. In the Delphi project options, for the Win64 Debug configuration:

    • Compiling -> Optimization off, Debug information on, Local symbols on
    • Linking -> Debug information on, Include remote debug symbols on
      (this is the .rsm), Map file: Detailed

    On the command line: -$O- -V -VN -VR. Keep the .map and .rsm beside the .exe.

What each artefact buys you:

Artefact Without it
TD32 section, .map, or JCL data — any one no source lines: no breakpoints, no stepping
.rsm breakpoints and stepping still work, but local variables, types and expression evaluation are severely limited
optimizations off breakpoints land on the wrong line and locals read as garbage, because the code no longer matches the source

The same applies to every runtime package you want to step into: a BPL
compiled without debug information stays a black box even when the host has full
symbols. To step into the RTL and VCL, also enable Use debug .dcus.

What is in the box

Setup.exe Installer and updater
local.delphi-win64-debug/ The VS Code extension plus the DAP adapter
DelphiDebuggerMcp.exe MCP server — 33 tools that let an agent set breakpoints, step, and read locals
register-mcp.ps1 Registers or unregisters the MCP server

SHA-256 of the zip:
0268970B5DCCD07B4DBFEE28F2091B8D6A620E3F0B287E25853C99F3C32E2564