PreLaunchTask correctly waits for background task to wait for client connection, then fails with vague popuop
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con las configuraciones launch.json y tasks.json del informe y luego reproduce el flujo con pants test --debug-adapter ${file} y la preLaunchTask de VS Code. Comprueba el problem matcher de la tarea en segundo plano y la ventana emergente resultante. Se considera terminado cuando la preLaunchTask espera según lo configurado y debugpy se conecta a la configuración remota.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment data
- debugpy version: 1.8.6
- OS and version: MacOS (ARM) 14.6.1
- Python version: 3.10.6
- Using VS Code or Visual Studio: VS Code
Actual behavior
I'm using Pants to run python tests. The program behaves as expected (starts the test with pdb and waits for client connection):
➜ pants test --debug-adapter example_test.py
12:16:25.45 [INFO] Launching debug adapter at '127.0.0.1:5678', which will wait for a client connection...
I would like to use a launch configuration with a preLaunchTask to make debugging easy. However, VS Code does not behave as expected with the background task. I have tried seemingly every possible combination of isBackground, problemMatcher.background, and other fields. Below is what I believe should work according to documentation. When the "Pants: Debug Test" launch configuration is triggered, it calls the correct shell command and correctly waits for the "Launching debug adapter" endPattern to be printed, but then fails with a vague popup
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Pants: Debug Test",
"preLaunchTask": "Pants Debug Test (Current File)",
"type": "debugpy",
"request": "attach",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
],
"connect": {
"host": "localhost",
"port": 5678
}
}
]
}
tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Pants Debug Test (Current File)",
"type": "shell",
"command": "pants test --debug-adapter ${file} ",
"group": "test",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"isBackground": true,
"problemMatcher": {
"owner": "pants",
"source": "pytest",
"fileLocation": "relative",
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".*Launching debug adapter.*",
},
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
]
}
}
]
}
Expected behavior
PreLaunchTask to run, and debugpy to attach to remote configuraiton
Steps to reproduce:
Above launch.json/task.json and a sample pants project
- Lenguaje dominante
- Python
- Estrellas
- 2.5k
- Forks
- 202
- Merge medio
- 5 d 1 h
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/debugpy
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Document "rules"-option Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Todos los issues de microsoft/debugpy
Issues similares
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Abiertoarea: harness bug status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Human-Agent-Society/reef#625 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
learningequality/kolibri#15351 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Name consistency Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eellak/triplestore#65 · 1 comentario ·