How debugg unittest with visual code + code-d

WebFreak001 d.forum at webfreak.org
Sat Jun 6 08:42:22 UTC 2020


On Saturday, 6 June 2020 at 08:06:02 UTC, Luis wrote:
> On Friday, 5 June 2020 at 18:13:52 UTC, WebFreak001 wrote:
>> [...]
>
> 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.

You can change it to

{
	"label": "dub build", // <-- add a good name here
	"type": "dub",
	"test": true,
	"problemMatcher": [
		"$dmd"
	],
	"group": "build"
}

but it will run the unittests then too (not just build them), 
which will increase the task running time


More information about the Digitalmars-d-learn mailing list