microsoft / microsoft/vscode-cpptools

GDB Showing Dead Threads?

Abierto
#13,393 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug debugger help wanted
Lenguaje dominante
TypeScript
Estrellas
6.2k
Forks
1.7k
Merge medio
14 h 46 min
PR fusionados (30 d)
61

Descripción

Environment
  • OS and version: Ubuntu 20.04.6 LTS
  • VS Code: 1.98.2
  • C/C++ extension: 1.23.6
  • OS and version of remote machine (if applicable): Ubuntu 20.04.6 LTS within Docker Container
  • GDB / LLDB version: GDB 9.2
Bug Summary and Steps to Reproduce

Bug Summary:
I am trying to get debugging with GDB going but am having issues. Everything launches fine and otherwise works. Breakpoints stop the thread (program hangs) but VSCode does not update to show the program is stopped, does not list variables, etc. Basically acts as if it didn't see the breakpoint get hit.

While trying to figure this out, I noticed that the one thing it does show, the threads, is incorrect. After breaking the debugger and using the debugger console, I see this:
-exec info inferiors
Num Description Executable

  • 1 process 121733 /var/pyEnv/bin/python

One process, as expected. However in my side bar:

Image

This list goes down. There are maybe 50 or 60. VSCode thinks these are running threads but they are not. When running they all say running, when stopped they all say stopped. These threads do not exist. Perhaps this is confusing VSCode as to which "thread" it should be listening to?

When I do gdb manually on the command line, it works fine. I can set a breakpoint and have it stop there, view variables, etc. Just seems like VSCode is getting its wires crossed.

Any advice or workarounds?

Steps to reproduce:

  1. In this environment: debug a python "script" (I am trying to debug C code called by python)
  2. With this config: Launch GDB with python
  3. Do: Launch debugger
  4. See error: VSCode doesn't really let me debug. Seems to think there are a lot of threads that don't exist
Debugger Configurations
{
            "name": "Debug Extension",
            "type": "cppdbg",
            "request": "launch",
            "program": "/var/pyEnv/bin/python",
            "args": ["someScript.py", "-a", "-b"],
            "MIMode": "gdb",
            "cwd": "${workspaceFolder}",
            "miDebuggerPath": "/usr/bin/gdb"
        }
Debugger Logs
I am trying to get debug logs but there is so much text that it seems to hang VSCode
Other Extensions

No response

Additional Information

No response

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduzca el problema con la configuración de lanzamiento cppdbg proporcionada, el script de Python, el entorno Docker de Ubuntu y GDB 9.2. Compare la salida de -exec info inferiors de la consola del depurador con la lista de subprocesos de VS Code, y utilice los registros de depuración disponibles para determinar por qué las paradas en puntos de interrupción no actualizan las variables ni el estado de ejecución. Se considera terminado cuando la lista de subprocesos refleja el proceso real y las paradas en puntos de interrupción se comportan como en GDB desde la línea de comandos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python, vscode
Área
devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.