Inclusion of colon in a documentation block or string crashes provideCodeActions
See original GitHub issueMacOS Mojave 10.14.6 (but was happening in prior version) VSCode latest 1.38.1 DMD latest 2.088.0 (installed systemwide)
I deleted ~/.vscode/extensions/webfreak.code-d-0.20.2/ and ~/.code-d , reinstalling everything and verified the problem still occurs.
I CAN reproduce this with a simple hello world project (note: I set up helloworld correctly in its own workspace and verified that code-d/serve-d are running, providing context suggestions etc.)
Failure (crash loop, which is terminated after 20? restarts) is triggered by placing cursor at certain places inside a documentation block. Clicking out before the failsave # of failures restores normal functionality; waiting too long causes the serve-d not to be restarted and the workspace must be closed and reopened.
The failing function is provideCodeActions. Only clicking certain places within the documentation block trigger the failure. For example, in this block:
/** A frustrating problem
For XXX portion, mirror approach as in https://github.com/user/repo
ok
*/
Considering the middle line (“For XXX portion…”) Placing the cursor anywhere on that line seems to work fine (calling provideCodeActions yielding no output) until you get to the URL at which point the function crashes.
However over the URL without clicking calls provideHover which works correctly.
Interestingly, positioning the cursor at (left of) h, t, t, p, or s does not cause problems, but placing it at the : induces the failure. Positioning it on the ok in the last line also induces the problem.
Complete program hello.d:
/** A frustrating problem
For XXX portion, mirror approach as in httpsX//github.com/user/repo
ok
*/
import std.stdio;
/// A fine function
int main()
{
writeln("Hello world");
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (4 by maintainers)

Top Related StackOverflow Question
The same thing in these examples. Seems that semicolon and curly brackets stop the error from flooding the whole file.
after the latest betastream update the initial problem disapears ! Thanks
But i can confirm the crash with
Same behavior as initial issue, lots of crash (living a bunch of dcd-server ghosts running in background) and then one must restart vscode after killing manually the dcd-server ghosts. (ubuntu 18.04, latest official dmd/ldc release)