diff --git a/.vscode/launch.json b/.vscode/launch.json index 1112a96..cf519dc 100644 --- a/.vscode/launch.json +++ b/.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", }, ] diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..4a35f59 --- /dev/null +++ b/.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" +} \ No newline at end of file