javaVSCode icon indicating copy to clipboard operation
javaVSCode copied to clipboard

the debugger starts with nothing happening

Open y1xiaoc opened this issue 8 years ago • 20 comments

hello, I've been trying to use VSCode to write and debug java. However after I set up the configuration and click the debug button, nothing happened.

Here are pictures about the problem. The first one shows my configuration and the second one shows the state after I clicked the debug button. Please ignore the folder named "1". config debug

Even if I change the startup class into a non-exist class the debugger still remains the same and throw no error. Any body can help me? Lots of thanks!

y1xiaoc avatar Feb 28 '17 14:02 y1xiaoc

I have the same question, please!how do you fix it?

devin-sxp avatar May 01 '17 04:05 devin-sxp

+1 same problem.

yagupta avatar May 02 '17 18:05 yagupta

Sometimes this happens, I just stop the debugger and run again.

Could be that java debug server is waiting for connection.

faustinoaq avatar Jun 10 '17 16:06 faustinoaq

+1 same problem beg someone!!!!!!!Could you help me!!!!??!?!?!??!

TenviLi avatar Aug 07 '17 17:08 TenviLi

@gylidian this eventually happens, just try to reload your editor and debug again.

mine is working as expected.

screenshot_20170807_124414

faustinoaq avatar Aug 07 '17 17:08 faustinoaq

@faustinoaq I am just a junior middle school student;During these several days,I am always confused with this problem. My vscode can only run,but cannot debug. Follow your saying,after reload,nothing changed.

This is my launch.json { "version": "0.2.0", "configurations": [{ "name": "Java", "type": "java", "request": "launch", "stopOnEntry": true, "jdkPath": "D:/Java/jdk1.8.0_144/bin", "cwd": "${fileDirname}", "startupClass": "${fileBasenameNoExtension}", "classpath": [ ".", "${fileDirname}" ] }, { "name": "Java Console App", "type": "java", "request": "launch", "stopOnEntry": true, "jdkPath": "${config:java.home}/bin", "cwd": "${fileDirname}", "startupClass": "${fileBasenameNoExtension}", "classpath": [ ".", "${fileDirname}" ], "externalConsole": true } ] }

I want to cry

TenviLi avatar Aug 07 '17 17:08 TenviLi

Your launch.json looks good, I don't know what could be the problem :sweat_smile:

faustinoaq avatar Aug 07 '17 19:08 faustinoaq

@faustinoaq Thank you all the same! ~~😸

TenviLi avatar Aug 07 '17 20:08 TenviLi

your jdk language is not english

hspeed avatar Aug 26 '17 02:08 hspeed

I have the same problem, don't know why

huijian142857 avatar Sep 22 '17 03:09 huijian142857

Yeah, It is a known issue.

I don't know what why it happens. Also is a bug hard to reproduce.

your jdk language is not english

Maybe you can try a machine completely in English :sweat_smile:

faustinoaq avatar Sep 22 '17 08:09 faustinoaq

@faustinoaq Hi, faustinoaq , I have encountered this issue too. After days of searching in github.com | visualstudio.com | stackoverflow.com , and now ...... I hate this issue ...... If you would, please give a intelij OR eclipse simple HelloWorld sample, which have project structure and vs code settings(settings.json tasks.json launch.json ), thank you very much

Yensan avatar Sep 22 '17 10:09 Yensan

I recommend you Intellij or Eclipse because they are more friendly and work out the box. :sweat_smile:

VSCode is a bit messy, because you need to figureout about bugs, misconfigurations, enviroments, etc. So I'm able to debug using this plugin, but it sometimes doesn't fit my requirements.

VSCode is better for JavaScript/Typescript, and other languages without an IDE. However Java is widely supported by almost every good IDE (Intellijj, Eclipse, Netbeans, etc).

faustinoaq avatar Sep 22 '17 12:09 faustinoaq

@faustinoaq Yes, you are right. I just want to edit all of languages in one place, and open too much window is so complex. But finally, Intelij or eclipse is better. Also vs code can edit python, but when I want to develop program nor script, I will use pyCharm. (what I said just looks like a jet brain's Ad, ^_^ )

Yensan avatar Sep 23 '17 03:09 Yensan

@faustinoaq I have tried restart or reload for several times, but nothing changed

LimnN avatar Sep 26 '17 03:09 LimnN

And I found an error in the output window: image

LimnN avatar Sep 26 '17 03:09 LimnN

Currenlty I'm able to debug using the latest version of this extension:

screenshot_20170925_222832

I don't know what would be happening with you configuration :sweat_smile:

faustinoaq avatar Sep 26 '17 03:09 faustinoaq

I'm using the default configuration

faustinoaq avatar Sep 26 '17 03:09 faustinoaq

@faustinoaq I set the launch.json same as yours, but still failed. the stepin stepout button I never have seen them become clickable. and the first green button, it always grey or a blue pause icon.

LimnN avatar Sep 26 '17 04:09 LimnN

@LimnN I don't know what would be happening, but If VSCode don't work for you, try Intellij Idea or Eclipse because they have better support for java debugging out-the-box :sweat_smile:

faustinoaq avatar Sep 26 '17 05:09 faustinoaq