-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
I have tried a few times over the years to use D with VSCodium but have never been able to get the debugger to work. Today I tried from scratch in a blank environment. Here are my steps for reproducing the problem:
DMD:
(As far as I know, DMD can't be debugged without the C++ extension, which is not available for VSCodium.)
LDC:
Download the following files:
- ldc2-1.39.0-windows-multilib.exe from https://github.com/ldc-developers/ldc/releases/tag/v1.39.0
- VSCodium-x64-1.92.2.24228.exe from https://github.com/VSCodium/vscodium/releases/tag/1.92.2.24228
- In the latest version of Windows 11, open Windows Sandbox. (Install it via "Turn Windows Features on or off".)
- Paste in and install the following files: ldc2-1.39.0-windows-multilib.exe and VSCodium-x64-1.92.2.24228.exe
- Open VSCodium.
- Go to the "Extensions" side tab, search for and install "Code-D" (webfreak.code-d) and "CodeLLDB" (vadimcn.vscode-lldb).
- [Setup D Compiler] > [ldc 1.39.0] > [OK]
- In the bottom corner, [Reinstall serve-d]
- [File] > [Open Folder] > (Create and open a new folder on the Desktop named "test".)
- Ctrl+Shift+P >
code-d: Create new Project
>Empty Win32 Application
- Go to the "Explorer" side tab and open
source/app.d
. - Click the left margin of the first line in the main function to set a breakpoint. (Red circle.)
- Press F5.
- Select [DUB (code-d: Native Debug / C++ / CodeLLDB)]
- (Nothing happens.)
- Go to the "Run and Debug" side-tab.
- Click the "create a launch.json file" link.
- Select [DUB (code-d: Native Debug / C++ / CodeLLDB)]
- Go back to the
source/app.d
tab. - Press F5.
- "Oops! The debug adapter has terminated abnormally." > [Open log]
- "Debug adapter exit code=3221225781 (0xc0000135), signal=null."
GDC:
Download the following files:
- winlibs-i686-posix-dwarf-gcc-14.2.0-llvm-18.1.8-mingw-w64ucrt-12.0.0-r1.7z from https://github.com/brechtsanders/winlibs_mingw/releases/tag/14.2.0posix-18.1.8-12.0.0-ucrt-r1
- VSCodium-x64-1.92.2.24228.exe from https://github.com/VSCodium/vscodium/releases/tag/1.92.2.24228
- In the latest version of Windows 11, open Windows Sandbox. (Install it via "Turn Windows Features on or off".)
- Paste in winlibs-i686-posix-dwarf-gcc-14.2.0-llvm-18.1.8-mingw-w64ucrt-12.0.0-r1.7z and extract it to the desktop.
- Move the mingw32 folder to C:\Program Files.
- Open the start menu, type "path", and select [Edit the system environment variables].
- [Environment Variables...] > "System variables" section > Double-click "Path"
- [New] > "C:\Program Files\mingw32\bin" > [OK] > [OK] > [OK]
- Paste in and install VSCodium-x64-1.92.2.24228.exe.
- Open VSCodium.
- Go to the "Extensions" side tab, search for and install "Code-D" (webfreak.code-d) and "Native Debug" (webfreak.debug).
- [Setup D Compiler] > [gcc 14.2.0] > [OK]
- In the bottom corner, [Reinstall serve-d]
- [File] > [Open Folder] > (Create and open a new folder on the Desktop named "test".)
- Ctrl+Shift+P >
code-d: Create new Project
>Empty Win32 Application
- Go to the "Explorer" side tab and open
source/app.d
. - Click the left margin of the first line in the main function to set a breakpoint. (Red circle.)
- Press F5.
- Select [GDB] (Options present: GDB, LLDB)
- (Nothing happens.)
- Go to the "Run and Debug" side-tab.
- Click the "create a launch.json file" link.
- Select [GDB]
- Go back to the
source/app.d
tab. - Press F5.
- "Failed to load MI Debugger: C:\Users\WDAGUtilityAccount\Desktop\test\bin\executable: No such file or directory."
- Delete the
{ blah }
block fromlaunch.json
so theconfigurations
block is empty. - In the "Run and Debug" side-bar, select the drop-down box next to the green arrow and select "Add Configuration...".
- Choose "DUB: Build and Launch".
- Press F5.
- "Cannot read properties of null (reading 'packagePath')"
Metadata
Metadata
Assignees
Labels
No labels