-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot debug JDK17 itself with "Debugger for Java" v0.49.1 #1330
Comments
In launch mode, the debugger will always force you to compile the code. It's either autobuild or a force compilation before launch. If you wanto to avoid the compilation from Java extension, then you can use attach mode instead. To use attach mode, you need to configure a task in tasks.json to launch the JDK program by yourself, and then configure an attach config in launch.json to launch them together. You can find a sample config on the link #120 (comment).
|
@testforstephen Thanks for your answer! It may help me with debugging in future. However there are still items 2), 3), and 4) in my report. They don't seem like questions, they look like the extension's problems for me, especially 3) and 4). I don't think they are related to the approach I use to start a debugger. Is there a workaround for them? |
For 2), It's hard to say what's wrong. It's better to provide a minimum sample project to reproduce the issue. For 3), you can try to add more
This is the JVM process of RedHat Java language support extension, used to serve language features such as code completion, compilation, etc. |
For 4), I believed that ""java.configuration.runtimes"" setting is to specify which JDK should be used by VSCode. It seems ignored, because VSCode still download and use RH JRE, so what is "java.configuration.runtimes" setting for? |
For 3), currently I use -Xmx2G value (suggested by VSCode on OOM error occured). Not sure if it will fail with OOM or not, need to test it. But at the moment I can see Java.exe from RedHat JRE, consuming 2GB RAM, as well as 55% CPU usage, for a long time. Is it OK? UPDATE: I'm doing nothing, waiting for the VSCode stops consuming resources. I've just got OutOfMemory error with the setting above. But java.exe still running with 2GB RAM and 55% CPU usage. Now VSCode suggested to increase memory to 4GB. |
Could you share the thread dump to help us understand what tasks are consuming high CPU usage? Here are the steps for thread dump:
Java extension is written by Java code, it uses its embedded JRE to launch the extension itself, that's why you see a JVM process from "C:\Users\username.vscode\extensions\redhat.java-1.17.0-win32-x64\jre\17.0.6-win32-x86_64\bin". This Java process usually scans your workspace folder to infer the possible source directories and compile your workspace.
|
After the latest extension update, it seems it started using redhat-java-1.18. |
Now it is v0.55.0. Still having issues.
And then, when memory is about to out, it looks like it drops the process and starts again - with a small amount of memory and high CPU usage, increasing memory consumption every sec. Not sure I understand what it's trying to achieve. |
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.
Is it really broken now?
Is my configuration wrong maybe?
Environment
My setting.json:
My launch.json:
The text was updated successfully, but these errors were encountered: