microsoft / microsoft/vscode-cpptools
Debug multi-process application problem
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
I'm trying debug multi-process app. So, I do it:
- Start Debugging (F5)
- Type in Debug Console
-exec attach <pid>,<pid>-- is process id of child fromps aux | grep appname - However, I get error:
-exec attach 3331
Unable to perform this action because the process is running.
- So, I guessed that I should set debugging to pause. Pressed Pause (F6), and got following error:
-exec attach 3331
A program is being debugged already. Kill it? (y or n) [answered Y; input not from terminal]
...
Thread 1 "kamailio" stopped.
0x00007ffff76a9912 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:30
ERROR: Error while trying to enter break state. Debugging will now stop. GDB exited unexpectedly.
The program '/home/marat/work_folder/kamailio-git/build/sbin/kamailio' has exited with code 42 (0x0000002a).
ERROR: GDB exited unexpectedly. Debugging will now abort.
-exec set follow-fork-mode child is not suitable I think, because application has more than 1 child processes.
And how I can fix it?
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 F5/F6 workflow in the Debug Console with -exec attach <pid> against an application with multiple child processes. Investigate how the VS Code C/C++ extension and GDB handle attaching while the launched program is running and entering break state. Done means multi-process debugging no longer exits GDB unexpectedly, or the supported workflow and limitation are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100