Debugging Crystal with VS code


I am trying to debug a crystal app using VS code. I followed what is explained here:
but so far it does not work for me. The pre-launch task is trying to compile a file but I have an error saying target was not found in shard.yml. However shard.yml has this same file for its target ‘main’:


main: src/


“label”: “Compile”,
“command”: “shards build --debug src/”,
“type”: “shell”

Somebody knows what I am doing wrong?


iirc you have to use the name you gave to the target, not the file (it’s already mentionned in shards.yml.
So for you it’d be: shards build --debug isekai


Thank you, that made it!