Skip to content

Commit

Permalink
Add config and file to test and debug specs in VSCode
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Jul 26, 2024
1 parent 4b6b2f7 commit 42848cd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"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 ${userHome}/.local/etc/lldb/crystal_formatters.py"
]
}
]
}
10 changes: 10 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "crystal: build current file (debug)",
"type": "shell",
"command": "crystal build -d ${relativeFile} -o bin/${fileBasenameNoExtension}",
}
]
}
1 change: 1 addition & 0 deletions specs.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "./spec/**"

0 comments on commit 42848cd

Please sign in to comment.