You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autocomplete not working, can’t resolve modules #492
I just installed the DMD Compiler to start learning and writing some simple D applications. I followed the instructions, but I’m having trouble getting autocomplete to work in VS Code.
From the code-d editor output, it looks like the extension might be having issues resolving the module/standard library (maybe).
Reproduce
Initialize a Dub project using either the code-d command or dub init.
Write some basic code:
importstd.stdio;
voidmain()
{
writeln("Hello, World!");
writeln("This is a D program.");
}
Editor Output
[warning] C:\Users\runneradmin\AppData\Local\dub\packages\dsymbol\0.11.3\dsymbol\src\dsymbol\conversion\first.d:384:visit Could not locate object.d or object.di
[warning] C:\Users\runneradmin\AppData\Local\dub\packages\dsymbol\0.11.3\dsymbol\src\dsymbol\conversion\first.d:481:visit Could not resolve location of module 'std\stdio'
Additional Information
OS: Windows 10
DMD Installation: Installed via Scoop (scoop install dmd)
DMD Version: DMD64 D Compiler v2.109.1
Editor: Visual Studio Code
I noticed the user in the error path is runneradmin, which is different from my Windows username. Not sure if that’s expected or if it’s related to the issue.
I’m new to D, so apologies if I’m missing something obvious.
I am unfamiliar with Scoop, and this might be a Scoop issue. If you know where Scoop installed DMD, search for "@ext:webfreak.code-d path" in VS Code Settings and specify the Dmd Path accordingly, perhaps that helps.
I am unfamiliar with Scoop, and this might be a Scoop issue. If you know where Scoop installed DMD, search for "@ext:webfreak.code-d path" in VS Code Settings and specify the Dmd Path accordingly, perhaps that helps.
Never mind, finding DMD is not your issue. DMD cannot find its runtime library, which I suspect is an installation issue.
Bumping this. Having the same issue on ARM macOS Tahoe (which I know was causing other problems in the D world). Things I've tried that didn't fix the problem:
I cloned the serve-d repo, built from tip of master, and pointed code-d to my manual build.
I added references to phobos and runtime library files in the d.stdlibpath setting for the extension.
Would appreciate if WebFreak could take a look! Thanks for your hard work on this project, really appreciate it as a D developer.
Activity
veelo commentedon Jan 15, 2025
I am unfamiliar with Scoop, and this might be a Scoop issue. If you know where Scoop installed DMD, search for "@ext:webfreak.code-d path" in VS Code Settings and specify the Dmd Path accordingly, perhaps that helps.
veelo commentedon Jan 15, 2025
Never mind, finding DMD is not your issue. DMD cannot find its runtime library, which I suspect is an installation issue.
zefir-git commentedon Sep 1, 2025
I have the same problem on Fedora Linux 42. I can use DMD fine in the terminal.
The only warning I see is
Fixed by switching to
serve-dbeta in settings.ericyoondotcom commentedon Oct 24, 2025
Bumping this. Having the same issue on ARM macOS Tahoe (which I know was causing other problems in the D world). Things I've tried that didn't fix the problem:
serve-drepo, built from tip of master, and pointedcode-dto my manual build.d.stdlibpathsetting for the extension.Would appreciate if WebFreak could take a look! Thanks for your hard work on this project, really appreciate it as a D developer.