-
Notifications
You must be signed in to change notification settings - Fork 645
Enable Easier Debugging of Code Requiring Root #2610
Comments
Can you try another workaround that involves setting the
This will make the extension call your script instead of dlv. And internally you can call dlv with |
@ramya-rao-a this works perfectly! Thank you :D Is there a way this could be made more discoverable though? |
Not sure... |
@ramya-rao-a do you expect this approach to work with the remote development extensions? My use case is similar, I also need to run dlv as root. I can debug a project sitting on the server just fine, but my This is my remote settings file.
Remote host is an UbuntuServer 18.04 |
I am also now having trouble with this approach using the remote development extension. After enabling debug logs I can verify that my script specified using go.alternateTools is not even being called. i have verified that the setting is set on the remote machine and an absolute path to the script is given. As a workaround, I moved the dlv binary to dlv.old then wrote a script in the same location as the dlv binary (calling it dlv) which calls |
This sounds like a duplicate of #2889 - please follow along with the discussion on that issue. |
Duplicate of #2889 |
Currently, if one needs to run code with superuser privileges, but edits it as a standard user, the debugging process is very convoluted. Since there is no way to specify "run delve as root" in the launch.json, here is what must be done currently:
Steps to Reproduce:
sudo /path/to/dlv debug --headless --log --listen=:<port> -- <args to program you want to debug>
launch.json:
tasks.json:
Suggested workflow:
"runas": "root"
or"root": true
The text was updated successfully, but these errors were encountered: