Skip to content

How to debug c program which require sudo in linux? #13080

Closed Answered by litianhe
litianhe asked this question in Q&A
Discussion options

You must be logged in to vote

has solved this questions by using .vscode/launch.json like below:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/x",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "/…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by litianhe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant