microsoft / microsoft/vscode-java-debug

Cannot debug JDK17 itself with "Debugger for Java" v0.49.1

Aperta
#1,330 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

ai-triaged bug question
Lingua principale
TypeScript
Stelle
591
Fork
429
Merge medio
1g 9h
PR unite (30g)
19

Descrizione

I'm building and debugging OpenJDK 17 on Windows 11. I'd like to debug it with VSCode.
I submitted the issue #1285 before for other version of extensions, but now Java Debugger extension seems totally broken.

  1. I have disabled "build before launch" for both User and Workspace, but every time I run the debug configuration (see below), I see the message about "Debug 'Launch Java Program': compiling..." and then "Build failed, do you want to continue?" with a lot of compilation errors.
  2. It can debug source of my tests, but it cannot step in JDK classes. It seems like it cannot find neither source files, not debug info for fresh built fast-debug JDK.
  3. If I open one of JDK java-files in VSCode and try run the debugger (the same configuration), it shows "Debug 'Launch Java Program': compiling...", and may hang until OutOfMemory error occurs.
  4. I have set "java.configuration.runtimes" option to manually downloaded JDK, but, in TaskMonitor, I still see Java.exe process running from "C:\Users\username\.vscode\extensions\redhat.java-1.17.0-win32-x64\jre\17.0.6-win32-x86_64\bin". It looks like scanning my JDK source files, but cannot do this properly. It consumes a lot of memory (1GB+), and reports about OutOfMemory error in VSCode time to time.

Is it really broken now?
Is my configuration wrong maybe?

Environment
  • Operating System: Windows 11
  • JDK version: 17
  • Visual Studio Code version: 1.77.3
  • Extension Pack for Java: v0.25.10
  • Debugger for Java: v0.49.1
  • Language Support for Java(TM) by Red Hat: v1.17.0

My setting.json:

    "java.configuration.runtimes": [
        {
            "default": true,
            "name": "JavaSE-17",
            "path": "c:\\Users\\username\\work\\jdk"
        }
    ]
    "java.debug.settings.onBuildFailureProceed": false,
    "java.debug.settings.forceBuildBeforeLaunch": false

My launch.json:

        {
            "type": "java",
            "name": "Launch Java Program",
            "request": "launch",
            "cwd": "${workspaceFolder}\\jdk\\myjdk\\MyJdkTest\\MyJdkTest",
            "mainClass": "jdk.test.lib.myjdk.MyJdkTest",
            "vmArgs": "-ea <other vm args>",
            "args": "<java test args>",
            "classPaths": [
                "${workspaceFolder}\\classes\\jdk\\myjdk\\MyJdkTest\\MyJdkTest.d",
                "${workspaceFolder}\\classes\\test\\lib"
            ],
            "javaExec": "c:/Users/username/work/myjdk/build/windows-x86_64-server-fastdebug/jdk/bin/java.exe",
        },

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il comportamento con i file settings.json e launch.json forniti, utilizzando le versioni indicate di OpenJDK 17, VS Code e dell’estensione su Windows 11. Verifica il runtime configurato, il comportamento di build-before-launch, l’esecuzione passo-passo del codice sorgente del JDK e l’utilizzo della memoria del processo Java; il lavoro è completato quando il malfunzionamento è isolato e viene identificata una configurazione di debugging funzionante o un difetto specifico dell’estensione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.