Skip to content

Commit 3bf9b23

Browse files
committed
Add basic VSCode configurations (run tests, debug)
We can now benefit from the standard debug gem integrated with the Ruby LSP VSCode extension.
1 parent 4cfdcaa commit 3bf9b23

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ruby-syntax-tree.vscode-syntax-tree",
4+
"shopify.ruby-lsp"
5+
]
6+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "ruby_lsp",
6+
"request": "launch",
7+
"name": "Debug test file",
8+
"program": "ruby -Itest ${relativeFile}",
9+
},
10+
]
11+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"group": "test",
8+
"label": "Run all tests",
9+
"type": "shell",
10+
"command": "bundle exec rake test",
11+
"problemMatcher": [],
12+
"presentation": {
13+
"clear": true
14+
}
15+
},
16+
{
17+
"group": "test",
18+
"label": "Run tests for current file",
19+
"type": "shell",
20+
"command": "bundle exec rake test TEST=${file}",
21+
"problemMatcher": [],
22+
"presentation": {
23+
"clear": true
24+
}
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)