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