Failed to get sources when debugging multi module maven project in vscode
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java, vscode
- Área
- developer-experience, devtools
Línea de trabajo
Comienza reproduciendo la configuración multi-módulo utilizando los pom.xml y launch.json referenciados, con breakpoints en el módulo principal y en los módulos referenciados. Investiga cómo sourcePaths resuelve el source JAR generado bajo target y, después, verifica que los breakpoints de todos los módulos muestren el código fuente en lugar de clases decompiladas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I managed to open a multi-module maven project in VS Code and set up the launch.json correctly. I can debug the project and the breakpoints are respected in the main module. When I set a breakpoint in a referenced module, the execution will break, but I see a decompiled version of the class with the following comments:
// Failed to get sources. Instead, stub sources have been generated by the disassembler.
// Implementation of methods is unavailable.
I added the plugin in pom.xml for that module to generate the source from maven and the source. Then I used mvn clean install and the source code JAR was generated successfully under the target folder for the specific module.
I tried to launch the debug again, and nothing worked. I still see the decompiled version of the class.
I configured "sourcePaths" in launch.json to point to the generated source JAR and it didn't and didn't work. I tried to point to the folder, relative path, absolute path, and with/without the filename, but nothing worked.
I appreciate your help to find a resolution to this issue.
Environment
- Operating System: Windows 11
- JDK version: 1.8 and 18
- Visual Studio Code version: latest
- Java extension version:
- Java Debugger extension version:
Steps To Reproduce
- Open Java multi module maven project in VS code and wait until its fully loaded
- Setup the launch config to debug the project.
- Set breakpoints in the main and the other referenced modules.
- Start debug
[attach a sample project reproducing the error]
attach logs
Current Result
Breakpoint works only with the main module. The breakpoint in the other module works but source code is not used.
Expected Result
Breakpoint should work and source code should be displayed for all modules.
Additional Informations
I tried all possible steps to resolve this problem but nothing worked.
- Lenguaje dominante
- TypeScript
- Estrellas
- 591
- Forks
- 429
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 19
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/vscode-java-debug
-
ai-triaged enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/vscode-java-debug#1689 · 2 comentarios ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 comentario · 1 asignado ·
-
ai-triaged bug
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
microsoft/vscode-java-debug#1658 · 1 comentario ·
-
ai-triaged enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoft/vscode-java-debug#1628 · 3 comentarios ·
-
Feature support. Abiertoai-triaged enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
microsoft/vscode-java-debug#1616 · 1 comentario ·
Todos los issues de microsoft/vscode-java-debug
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fil-donadoni/tolaria#4409 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
corsairdev/corsair#1764 ·