On Saturday, 6 June 2020 at 08:06:02 UTC, Luis wrote:
On Friday, 5 June 2020 at 18:13:52 UTC, WebFreak001 wrote:
To build before running the debugger, add the following task
to your task definitions file (Ctrl-Shift-B):
{
"label": "dub build", // <-- add a good name here
"type": "dub",
"run": false,
"buildType": "unittest", // <-- this makes it build the
unittests
"problemMatcher": [
"$dmd"
],
"group": "build"
}
It isn't working correctly on my case :
I get this error :
Performing "unittest" build using dmd for x86_64.
ddiv ~sparseSet: building configuration "unittest"...
../../../.dub/packages/silly-1.0.2/silly/silly.d(15,2): Error:
static assert: "Couldn't find 'dub_test_root'. Make sure you
are running tests with dub test"
dmd failed with exit code 1.
The terminal process terminated with exit code: 2
And this works fine if I run a dub test from console.
In my case, I just execute dub test from VSC terminal, use the
auto generated debugger configuration and just set the unittest
executable path.
This works fine on linux (WSL).
Kind regards
Andre