microsoft / microsoft/vscode-cpptools
Debug multi-process application problem
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
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?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den F5/F6-Workflow in der Debug Console mit -exec attach <pid> für eine Anwendung mit mehreren untergeordneten Prozessen zu reproduzieren. Untersuche, wie die VS Code C/C++-Erweiterung und GDB das Anhängen handhaben, während das gestartete Programm läuft und in den Haltezustand wechselt. Als erledigt gilt die Aufgabe, wenn das Debuggen mehrerer Prozesse GDB nicht mehr unerwartet beendet oder der unterstützte Workflow und die Einschränkung dokumentiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, vscode
- Bereich
- developer-experience, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100