Visual Studio Code and sudo
I'm developing C code on a Raspberry Pi that uses the pigio library to access GPIO pins and I2C and SPI busses. The source and executable are in my user space but program execution requires sudo to get the necessary privileges to execute. I would like to use the debugging facilities in VS Code, haven't found a way to get it to launch with privileges.
I tried from the source directory
sudo code "your-directory" --user-data-dir='.' --no-sandbox
but it didn't allow me to launch
I saw this note in an online post:
sudo code myfile stopped working sometime in July/August 2021
How can I debug or even execute code that requires root privileges within VS Code?