Reputation: 881
I'd like to create a task in VS Code for starting/stopping my postgres server. Is it possible to run a task using sudo?
For example, sudo service postgresql start
?
I've tried the following launch config but it fails with an error that it can't load such file.
{
"name": "Start Postgres server",
"type": "Ruby",
"request": "launch",
"program": "sudo service postgresql start"
}
Upvotes: 3
Views: 2865
Reputation: 8692
Try to change the type
property from Ruby
to the shell
.
{
"name": "Start Postgres server",
"type": "shell",
"request": "launch",
"program": "sudo service postgresql start"
}
Upvotes: 3