Utilities for developing in Delphi using VS Code.
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Embarcadero Technologies, or any of its subsidiaries or its affiliates. The official Embarcadero Technologies website can be found at https://www.embarcadero.com/.
This extension does not include any proprietary Embarcadero code, libraries or binaries. To build Delphi projects, you must have a valid Delphi installation and the necessary environment variables set up. This extension does not work with the Delphi Community Edition due to its limitations on command-line compilation.
This extension is currently developed in my free time, and any feedback is welcome.
- Dual Project Views: Two separate project management approaches:
- Self-Defined Workspaces: User-customizable project workspaces with drag & drop support
- Loaded Group Project: Load and manage Delphi group projects (.groupproj) - readonly view
- Multi-Compiler Support: Configure and switch between multiple Delphi versions (Delphi 2007 → Delphi 13.0 Florence built-in)
- Project Management: Compile, recreate, run, and manage Delphi projects with keyboard shortcuts
- Bulk Compilation: Compile or recreate all projects in a workspace or group project at once; cancellable at any time
- Workspace Management: Create, rename, remove workspaces and move projects between them
- File System Integration: Show projects in Explorer, open in File Explorer
- Configuration Management: Create and configure .ini files for executables
- Visual Indicators: File icons for Delphi files and missing file indicators
- Configuration Import/Export: Backup and restore your entire DDK configuration
- File-Based Persistence: Project and compiler data stored as RON files in
%APPDATA%/ddk/ - File Navigation: .pas <-> .dfm swapping with Alt+F12 hotkey
- Smart Navigation: .dfm -> .pas jumps with Ctrl+click
- Compiler Output Enhancements: Timestamps, clickable file links, and diagnostics published to the Problems panel
- Formatter Support: Configurable Delphi code formatter.
- LSP Server: Bundled
ddk-server(Rust) handles all project state, compilation, and formatting - MCP Server: Bundled
ddk-mcp-serverexposes project and compiler management as MCP tools for AI assistants (VS Code Copilot, Claude Desktop, etc.) - CLI (
ddk): Standalone command-line interface for managing projects and compilers outside of VS Code. Install via WinGet or use the bundled binary.
Install from the Visual Studio Marketplace. The extension bundles all Rust binaries — no extra setup needed.
winget install ValentinBaron.DDK
Or download ddk-windows-x86_64.zip from the latest release and add ddk.exe to your PATH.
ddk project list # List all known projects
ddk project select <ID> # Select a project by ID
ddk projects add <PATH> <WORKSPACE> # Add a .dproj/.dpr/.dpk to a workspace (by name)
ddk projects add_workspace <NAME> <COMPILER> # Create a workspace bound to a compiler
ddk compiler list # List available compiler configurations
ddk compiler set <KEY> # Set the group project compiler
ddk compile # Compile the active project
ddk compile <ID|NAME> # Compile a project by ID or name (= -p; lists candidates if ambiguous)
ddk compile -p <ID|NAME> # Same, explicit flag form
ddk compile --rebuild -p <ID> # Rebuild a specific project by ID
ddk compile <PATH> # Compile a .dproj/.dpr/.dpk (uses the owning project if managed, else ad-hoc)
ddk compile <PATH> -c "Delphi 12" # ...choosing the compiler (key or product name)
ddk compile <PATH> --config Release --platform Win64 # ...with build overrides
ddk compile --show-warnings # Include warnings verbatim
ddk compile --show-hints # Include hints verbatim
ddk compile --summarize-diagnostics # Append `<file>: X warn, Y hint` per project
ddk compile -e windows-1252 # Decode compiler output with a specific encoding
ddk compile --fail-on-error # Exit non-zero when the compile fails
ddk compile <ID|NAME> -- /p:Foo=Bar # Pass extra arguments verbatim to MSBuild (after `--`)
ddk run # Run the active project's executable
ddk run <ID|NAME> # Run a project by ID or name (= -p; lists candidates if ambiguous)
ddk run <PATH> # Run a .exe directly, or a .dproj/.dpr/.dpk's owning project
ddk run -a "-flag \"value with spaces\"" # Override the project's saved Start Parameters for this run
ddk env # Show active project & compiler info
ddk info # Print the DDK README
ddk --json <command> # Output as JSON
ddk compile <PATH> compiles a .dproj/.dpr/.dpk. If the file already
belongs to a managed project it is compiled as that project (and a file shared
by several projects lists the candidates instead of compiling); otherwise it is
compiled ad-hoc without adding it to the saved project list (handy for one-off
builds). For the ad-hoc case --compiler/-c selects the compiler by exact key
(12.0) or product name (Delphi 12), defaulting to the newest installed
compiler. The same is exposed to AI tooling via the MCP delphi_compile_file,
delphi_add_project, and delphi_add_workspace tools.
Anything after a -- separator on ddk compile is passed verbatim to MSBuild
(e.g. ddk compile be -- /p:DCC_Define=FOO /m). These extra arguments are
appended after DDK's own /p:Config//p:Platform args, so a /p: override
here wins (MSBuild takes the last value). They have no effect on a bare
.dpr/.dpk target, which is compiled with the command-line compiler (dcc)
rather than MSBuild — DDK prints a note when they are ignored.
ddk compile --json (and the MCP compile tools) return a fully machine-coded
result: structured header fields (project, project_path, compiler,
config, platform, action, success, code) plus a diagnostics object
grouped into errors/warnings/hints, each entry carrying
{code, file, line, message}. There is no raw log text. Diagnostics obey the
same --show-warnings / --show-hints filters — errors always appear, warnings
only with --show-warnings, hints only with --show-hints — so a slim compile
stays slim; pass both flags to get every diagnostic. Compiler output is
decoded using the active console output codepage
(what chcp sets); use -e/--encoding (or the DDK_COMPILER_ENCODING
environment variable) to force a specific encoding. By default ddk compile
exits 0 even on a failed compile (the result is in the JSON); pass
--fail-on-error to exit with the compiler's exit code instead (a cancelled
compile exits 2).
Compile output for the CLI and the MCP delphi_compile_project tool is
trimmed for AI / token-efficient consumption: the decorative banner box is
stripped and warning / hint lines are hidden by default. Errors and the final
status line are always shown.
ddk run <PATH> dispatches on the file extension: a .exe is launched
directly; a .dproj/.dpr/.dpk must already belong to a managed project
(its stored executable is run, same resolution as by name) — it is never
compiled or run ad-hoc. A project with a configured Host Application
(the Debugger_HostApplication from Project > Options > Debugger in the
Delphi IDE, or the DevKit Set Host Application override, which wins) runs
that host executable instead — matching the IDE, and making a .dpk
package project runnable at all. --args/-a overrides the run parameters for that
one run; the process is launched detached, so the CLI/MCP call returns
immediately without waiting for it to exit. The same is exposed to AI
tooling via the MCP delphi_run_project and delphi_run_file tools.
Without --args, a project runs with the .dproj's own Debugger_RunParams
— the Run Parameters set via Project > Options > Run in the Delphi IDE,
resolved against the project's active configuration/platform — fused with
the saved Start Parameters (see Set Start Parameters below): the dproj
value comes first, the saved value is appended after, so both take effect
rather than one silently replacing the other. In the VS Code extension this
can be turned off with the ddk.projects.useDebuggerRunParams setting:
disable it to always use only the saved Start Parameters, ignoring the
dproj's Run Parameters entirely. The CLI/MCP always fuse Debugger_RunParams
in, since there is no extension setting for them to consult.
Swap .DFM/.PAS- Switch between form and unit files (Alt+F12)
Select Delphi Compiler for Group Projects- Choose the active compiler configuration for .groupproj filesPick Group Project- Load a Delphi group project (.groupproj)Unload Group Project- Unload the currently loaded group projectTransfer Group Project to Workspace- Convert the loaded group project into a self-defined workspaceRefresh- Refresh the projects view and discover file paths
Add Workspace- Create a new self-defined workspaceRename Workspace- Rename an existing workspaceRemove Workspace- Delete a workspace and its projectsAdd Project- Add projects to a workspaceRemove Project- Remove projects from a workspace
Import Configuration- Import DDK configuration from JSON fileExport Configuration- Export DDK configuration to JSON fileEdit Default .ini- Edit the default INI template fileEdit Formatter Config- Edit the Delphi formatter configuration fileReset Formatter Config- Reset the formatter configuration to defaultsEdit Compiler Configurations- Open the compiler configurations RON file directlyEdit Projects Data- Open the projects data RON file directly
Compile Selected Project- Compile the selected project (Ctrl+F9)Recreate Selected Project- Clean and rebuild the selected project (Shift+F9)Compile All in Workspace- Compile all projects in a workspaceRecreate All in Workspace- Clean and rebuild all projects in a workspaceCompile All in Group Project- Compile all projects in the loaded group projectRecreate All in Group Project- Clean and rebuild all projects in the loaded group projectCancel Compilation- Cancel the active compilation (Ctrl+F2)Run Selected Project- Execute the selected project (F9)Set Start Parameters- Configure command-line arguments passed to the executable when runSet Host Application- Configure the executable that hosts the project when run (e.g. the application loading a .dpk package); overrides the dproj's ownDebugger_HostApplicationConfigure/Create .ini- Create or edit INI configuration filesSet Manual Path- Manually set the .dproj path for a project
ddk.compiler.encoding: Character encoding used to decode MSBuild output (oemby default, useutf8if your paths contain non-ASCII characters).ddk.projects.useDebuggerRunParams: When running a project, fuse the.dproj's ownDebugger_RunParamswith the saved Start Parameters, dproj first (trueby default). Disable to always use only the saved Start Parameters.
Compiler configurations are stored in %APPDATA%\ddk\compilers.ron and managed by the DDK server. The extension ships with built-in presets for all Delphi versions from Delphi 2007 to Delphi 13.0 Florence.
You can view and edit them directly via the Edit Compiler Configurations command. Each entry includes:
product_name/compiler_version/package_version— version identifiersinstallation_path— root path of your Delphi installationbuild_arguments— MSBuild arguments passed during compilationcondition— optional expression to enable/disable the entry
The first entry whose Formatter.exe is found in its installation path is used for formatting.
- Customizable: Create and organize your own project workspaces
- Drag & Drop: Move projects within and between workspaces
- Compiler Assignment: Each workspace has a predefined compiler
- Persistent: Projects and workspaces are stored in
%APPDATA%\ddk\projects.ron
- Read-Only: View projects from .groupproj files
- Compiler Selection: Use the compiler picker for group project compilation
- Cross-Copy: Drag projects from group projects to self-defined workspaces
- Selected Project: Shows
←Sindicator for the currently selected project - Missing Files: Shows
!indicator for files that don't exist - File Type Icons: Custom icons for .pas, .dfm, .dpr, .dpk, .dproj files
Alt+F12- Swap between .PAS and .DFM filesCtrl+F9- Compile selected project (when project is selected)Shift+F9- Recreate selected project (when project is selected)F9- Run selected project (when project has executable)Ctrl+F2- Cancel active compilation
None so far.





