Failed to get sources when debugging multi module maven project in vscode
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java, vscode
- Bereich
- developer-experience, devtools
Rechercherichtung
Beginne damit, das Multi-Modul-Setup mithilfe der referenzierten pom.xml und launch.json zu reproduzieren, mit Breakpoints im Hauptmodul und in den referenzierten Modulen. Untersuche, wie sourcePaths die generierte Source-JAR unter target auflöst, und verifiziere anschließend, dass Breakpoints in allen Modulen Quelltext statt dekompilierter Klassen anzeigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 591
- Forks
- 429
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 19
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-java-debug
-
ai-triaged bug
microsoft/vscode-java-debug#1703 · 1 Kommentar · 1 Reaktion · 1 zugewiesene Person ·
-
ai-triaged enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
microsoft/vscode-java-debug#1689 · 2 Kommentare ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 Kommentar · 1 zugewiesene Person ·
-
ai-triaged bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
microsoft/vscode-java-debug#1658 · 1 Kommentar ·
-
ai-triaged enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/vscode-java-debug#1628 · 3 Kommentare ·
Alle Issues in microsoft/vscode-java-debug
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
TanStack/tanstack.com#1293 ·