Browse Source

debugger run prelaunch task

pagy
pvincent 11 months ago
parent
commit
0332e782a8
  1. 1
      .vscode/launch.json
  2. 17
      .vscode/tasks.json

1
.vscode/launch.json

@ -5,6 +5,7 @@
"type": "ruby_lsp",
"name": "Debug Rails",
"request": "launch",
"preLaunchTask": "PKILL: /bin/dev",
"program": "bin/rails server --port 3000",
},
]

17
.vscode/tasks.json

@ -0,0 +1,17 @@
{
"tasks": [
{
"type": "shell",
"label": "PKILL: /bin/dev",
"command": "kill -9 $(ss -tlnp | grep 3000 | grep -oP \"pid=\\K(\\d+)\" | head -n1)",
"detail": "Pkill previous Rails server",
"presentation": {
"showReuseMessage": false,
"reveal": "silent",
"close": true
}
}
],
"version": "2.0.0"
}
Loading…
Cancel
Save