microsoft / microsoft/vscode-cpptools
Unable to pause execution with root gdb
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: Ubuntu 16.04.6 LTS
- VS Code Version: 1.38.1
- C/C++ Extension Version: 0.25.1
We needed to debug a program which needs root privileges to be run. In order to do this a added a wrapper to gdb to lauch with sudo and without password.
#!/bin/bash
sudo gdb "$@"
When we launch a program with the wrapped dbg(set on miDebuggerPath), we are not able to pause the execution of the program or add and stop on a breakpoint.
Although, when the breakpoint is already set before lauching the debugger, it will pause there and we are able to step through the code and also set new breakpoints. After removing the breakpoints and continuing execution we are again unable to pause execution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the sudo gdb wrapper configured through miDebuggerPath on Ubuntu. Compare pausing and breakpoint behavior before and after continuing execution; done means execution can be paused and breakpoints can be added reliably while debugging a root-required program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, typescript, ubuntu, vscode
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100