Skip to content

Commit c30a704

Browse files
committed
documenting "how to sudo"
fixing #387
1 parent 5234c7b commit c30a704

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ Because some builds requires one or more environment files to be sourced before
155155
command, you can use the `ssh.bootstrap` option to add some extra commands which will be prepended
156156
to the debugger call (using `&&` to join both).
157157

158+
### Debugging a process from a different user (especially root/system processes)
159+
160+
To debug a program that needs additional privileges you may use one of the two approaches:
161+
162+
1. start vscode with the necessary rights (so both the program and the started debugger instance will
163+
have root rights) - `sudo code` / `sudo codium` or "start as admin".
164+
Note that this has a lot of security implications and will have the user settings of vscode for this user.
165+
3. preferred: use a small wrapper script that calls `sudo gdb $*` / `runas /profile /user:admin-user`
166+
(or the debugger of your choice) and configure this extension to use it (for example with `gdbpath`)
167+
158168
### Extra Debugger Arguments
159169

160170
Additional arguments can be supplied to the debugger if needed. These will be added when

0 commit comments

Comments
 (0)