Skip to content
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

Code not able to debug and run #1384

Open
Prajwalpt opened this issue Aug 26, 2024 · 3 comments
Open

Code not able to debug and run #1384

Prajwalpt opened this issue Aug 26, 2024 · 3 comments

Comments

@Prajwalpt
Copy link

Type: Bug

after selecting run java, code is not executing and taking a lot of time to debug

Extension version: 0.29.0
VS Code version: Code 1.92.2 (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.88GB (3.55GB free)
Process Argv --crash-reporter-id b3e4eecc-125d-4561-9321-df577e75e77b
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
bdiig495:31013172
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
flightc:31119335
wkspc-onlycs-c:31111717
ei213698:31121563

@jdneo
Copy link
Member

jdneo commented Aug 27, 2024

Can you provide more information? Like A sample project.

@mojo2012
Copy link

mojo2012 commented Aug 29, 2024

I have a similar problem. Yesterday the problem occurred the first time.
I was in the middle of a debugging session. I had to restart the the debugger, but it just didn't start.

The debug toolbar looks like it is already in debug mode. But the jvm never launches.
I switched to the internalterminal (instead of internalConsole) and I saw that the java hangs, probably waiting for the debugger to connect:

 cd /Users/matthias.fuchs/Projekte/HHLA/hhla_kv/pim ; /usr/bin/env /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:49403 @/var/folders/j6/r_jhyfvd1xj9ymxf69mcyzhw0000gp/T/cp_e01jqjq6qxfp9tuozam68bghs.argfile com.kps.hhla.backend.PimApplication 

There is not output whatsoever in the debug log. After sometime though this shows up in the "language server for java" log:

[Error - 17:04:09] 29.08.2024, 17:04:09 [error response][launch]: Failed to launch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutException
Failed to launch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutException
com.microsoft.java.debug.core.DebugException: Failed to launch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutException
	at com.microsoft.java.debug.core.adapter.handler.LaunchWithDebuggingDelegate.lambda$launchInTerminal$0(LaunchWithDebuggingDelegate.java:147)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
	at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.lambda$sendRequest$2(AbstractProtocolServer.java:178)
	at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
	at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

I have not installed or updated anything.

My vscode is 1.93.0-insider and 1.92.2.
OS: macOS 14.4.1 (23E224)
Java: openjdk version "21.0.4" 2024-07-16 LTS

Using the insiders version was a way to try out if this has something to do with the latest update (although I had it already runnign for quite some time).

EDIT: restarting vscode a view times seemed to mysteriously have fixed it again. But I seriously doubt that this problem is fixed permanently.
Sadly, I have no other infos.

@Prajwalpt
Copy link
Author

Can you provide more information? Like A sample project.

Well thanks for asking, I configured it by reloading Window option and uninstalled extensions then reinstalled again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@mojo2012 @jdneo @Prajwalpt and others