You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My "testJavaDevelopDemo/.vscode/launch.json" just liking:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch)",
"request": "launch",
"mainClass": "${file}",
"console": "integratedTerminal"
}
]
}
My "testJavaDevelopDemo/testDemo.java' just liking:
public class testDemo {
public static void main(String[] args) {
int a=1;
int b=2;
int c = a + b;
System.out.println(a+"+"+b+"="+c);
System.out.println("hello world");
}
}
LOGS
Sorry, I had not known how to check out the logs of debugging.
Current Result
The VSCode has prompted "No delegateCommandHandler for vscode.java.resolveMainMethod"
while I click the "Start Debugger(F5)" button. Just like the below picture showing:
Notice Prompt: No delegateCommandHandler for vscode.java.resolveMainMethod
Expected Result
The VSCode could enter Debugger status while I click the StartDebugger(F5) button, just liking the below picture.
Java extension version: (Language Support for Java(TM) by Red Hat) v0.64.1
The latest version of Java Debugger extension is incompatible with RedHat Java extension 0.64.1. To avoid any issues, please update your RedHat Java extension to the most recent version.
I've just reverted the version of "'Debugger for Java'" from v0.50.0 into v0.20.0, and my Project "testDemo" worked! Also, updating the version of "Language Support for Java(TM) by Red Hat" to the latest "v1.18.0" fixed my trouble.
Finally, @testforstephen, thanks so much!
[VS Code has prompted "No delegateCommandHandler" while debugging the Java program]
Environment
macOS Monterey Version 12.6.5
1.8.0_292 (x86_64) "AdoptOpenJDK"
1.78.1
(Language Support for Java(TM) by Red Hat) v0.64.1
(Debugger for Java) v0.50.0
Steps To Reproduce
Compile and run are successful, also, output the result of this java program. just liking:
VS Code has prompted "
No delegateCommandHandler for vscode.java.resolveMainMethod
".A Sample Project
My workspace, just liking:
My "
testJavaDevelopDemo/.vscode/launch.json
" just liking:My "
testJavaDevelopDemo/testDemo.java
' just liking:LOGS
Sorry, I had not known how to check out the logs of debugging.
Current Result
The
VSCode
has prompted "No delegateCommandHandler for vscode.java.resolveMainMethod
"while I click the "
Start Debugger(F5)
" button. Just like the below picture showing:Expected Result
The
VSCode
could enterDebugger
status while I click theStartDebugger(F5)
button, just liking the below picture.Additional Informations
Try to fix the problem
I refer the Troubleshooting of vscode-java-debug, restart the "
VSCode
" once and the issue appear again, then reboot thelaptop and "
VSCode
", but that still a problem.Also, I found the same error liking #1308, tried to Downgrading versions of
the Test Runner for Java extension, also, I pressed "reload required" button next to the "
uninstall
" button,but that did not fix my issue.
SO I have to open this issue!
Java Home configuration
Just add the below code into my
ZSH
configuration file~/.zshrc
.Also, I config the "
javahome
" on theSettings
ofVSCode
.Others Environment
(Extension Pack for Java) v0.9.1
v0.38.2
v0.41.0
v0.22.0
v1.1.8
v0.2.7
The text was updated successfully, but these errors were encountered: