microsoft / microsoft/vscode-cpptools
Automatically attach gdb to child processes
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
Feature Request
this is perhaps a bit more complex than it sounds from the title. We submitted a feature request to the main vscode repo, and believe that is actually the correct place to address this, but they indicated this was the place to ask.
A little bit of background to explain the motivation:
We run a model-based simulation involving many (3 ~ 120) C++ parallel child processes, and a single parent "coordinator" that is responsible for launching, synchronizing, stepping, and, potentially killing/restarting these individual executables. At the beginning of simulation, this "coordinator" ingests a json that includes a description of which child processes to launch, and how to launch them.
We would like to capture the PIDs of child processes (C++) and automatically attach GDB to them, and there doesn't seem like a very good workflow for doing this. At present, we make use of separate attach launch tasks, and manually attach debuggers to a subset of child processes a few seconds after the parent launches them, using Augusto's Tasks Shell Input extension to capture child PIDs. It would be extremely helpful to both us and our users if that manual attachment could be made to be automatic.
A "vanilla" compound launch configuration doesn't work to debug the child processes, even with attach--it seems vscode wants to be able to attach to all configurations of a compound task immediately. Because the parent process (the "coordinator") has to do some work (such as ingesting the json description of the child processes) the child processes are not immediately available to attach to, so this seems not workable at present. This seems like an issue with compound tasks relying on pre-launch tasks to complete (i.e. in this case we would want a delay) before launching all their sub tasks (not sure of correct terminology here).
There might be a way of doing this out of the box in code but we have searched far and wide and have not been able to discover 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
Keine Repository-Datei, kein Test und kein Implementierungseinstiegspunkt ist identifiziert. Beginne damit, die verknüpfte VS Code-Feature-Anfrage und den hier beschriebenen kombinierten Start- und Anhänge-Workflow zu prüfen. Als erledigt gilt dies, wenn eine unterstützte Möglichkeit definiert und implementiert ist, GDB an untergeordnete Prozesse anzuhängen, nachdem der Koordinator sie verfügbar gemacht hat, einschließlich eines dokumentierten Workflows.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, typescript, vscode
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100