Skip to content

Commit 3281007

Browse files
committed
Add launch.json default on codespace postCreate
1 parent 92217c8 commit 3281007

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.devcontainer/launch.json.codespaces

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "ruby_lsp",
9+
"request": "launch",
10+
"name": "Debug rspec at cursor with browser",
11+
"program": "bundle exec rspec ${file}:${lineNumber}",
12+
"env": {
13+
"NOT_HEADLESS": "true"
14+
}
15+
},
16+
{
17+
"type": "ruby_lsp",
18+
"request": "launch",
19+
"name": "Debug with Events rspec at cursor with browser",
20+
"program": "bundle exec rspec ${file}:${lineNumber}",
21+
"env": {
22+
"NOT_HEADLESS": "true",
23+
"EVENTS_READ": "true"
24+
}
25+
},
26+
{
27+
"type": "ruby_lsp",
28+
"request": "attach",
29+
"name": "Attach to a live server"
30+
}
31+
]
32+
}

.devcontainer/post-create.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ RUBY_VERSION="$(cat .ruby-version | tr -d '\n')"
22

33
# copy the file only if it doesn't already exist
44
cp -n .devcontainer/.env.codespaces .env
5+
mkdir -p .vscode && cp -n .devcontainer/launch.json.codespaces .vscode/launch.json
56

67
# If the project's required ruby version changes from 3.2.2, this command
78
# will download and compile the correct version, but it will take a long time.

0 commit comments

Comments
 (0)