These configuration will let you use CodeLLDB extension to debug Crystal programs.
Store them as .vscode/tasks.json
and .vscode/launch.json
in your project.
When starting the debugging the current file will be built in the bin/
folder (as in shards build
).
Note: You will need to set the crystal binary path in tasks.json
"command"
field and the whole path in launch.json "initCommands"
. Read more at #8538
Hello,
I try to start my first Crystal programm. I use Visual Sudio Code in a Windows-Subsystem for Linux Ubuntu 20.04 LTS.
CodeLLDB 1.6.1 is installed
Wenn I start debugging there comes serval errors in the TERMINAL-window:
After removing the remarks in tasks.json and launch.json there is a problem with:
In .vscode/launch.json:10:17
10 | "args": [],
^
Error: for empty arrays use '[] of ElementType'
The terminal process "/bin/bash '-c', 'crystal build --debug .vscode/launch.json -o bin/launch'" terminated with exit code: 1.
Next try after removing args:
Do somebody have an idea?
Thanks a lot
Bob