microsoft / microsoft/vscode-cpptools
Automatically attach gdb to child processes
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono stati identificati file del repository, test o punti di ingresso dell’implementazione. Inizia esaminando la richiesta di funzionalità di VS Code collegata e il workflow di avvio composto e collegamento descritto qui. Il lavoro sarà completato quando sarà stato definito e implementato un modo supportato per collegare GDB ai processi figli dopo che il coordinatore li ha resi disponibili, con un workflow documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, typescript, vscode
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100