Skip to content

Instantly share code, notes, and snippets.

@lbarasti
Created July 14, 2020 09:30
Show Gist options
  • Save lbarasti/9a93544f3cf188772b8a369bdc409d97 to your computer and use it in GitHub Desktop.
Save lbarasti/9a93544f3cf188772b8a369bdc409d97 to your computer and use it in GitHub Desktop.
VS code config for Crystal projects - includes tasks to run and debug the current file
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "crystal: debug current file",
"preLaunchTask": "crystal: build current file (debug)",
"program": "${workspaceFolder}/bin/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceFolder}",
"initCommands": [
"command script import ~/bin/crystal-0.35.1-1/etc/lldb/crystal_formatters.py"
]
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "Crystal run",
"type": "shell",
"command": "crystal ${file}",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "crystal: build current file (debug)",
"type": "shell",
"command": "crystal build --debug ${relativeFile} -o bin/${fileBasenameNoExtension}"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment