Randomly Failed to lanuch debuggee in terminal: com.sun.jdi.connect.TransportTimeoutException
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java, typescript, vscode
- Domain
- devtools
Research direction
Start with LaunchWithDebuggingDelegate.java at line 147, where the stack trace reports the terminal launch failure. Reproduce with the shown Test.java program by repeatedly entering 1, and compare behavior with the terminal console setting enabled or disabled. Done means repeated launches no longer freeze or end in TransportTimeoutException.
Written by the indexing model from the issue text.
Description
Randomly getting error: Failed to lanuch debuggee in terminal: com.sun.jdi.connect.TransportTimeoutException
Environment
- Operating System: Debian GNU/Linux 12 x86_64
- JDK version: openjdk 17.0.7
- Visual Studio Code version: 1.79.2 (vscodium)
- Java extension version: v0.25.2023042006
- Java Debugger extension version: v0.51.0
Steps To Reproduce
It occurs completely randomly, and can be for any java code.
I managed to reproduce it:
- Create a simple
Test.java.
sample project
package com;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int i = scanner.nextInt();
}
}
- Start the program, enter
1in the terminal, pressEnter. - Repeat step 2 until error occurs. (10 ~ 30 repeats)
- After randomly repeating, from now on the program freezes every time, and after 20 seconds later a message always pops up, saying
Failed to lanuch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutException
screenshot
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Test",
"request": "launch",
"mainClass": "com.Test",
"projectName": "temp_43be885e"
},
{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "App",
"request": "launch",
"mainClass": "App",
"projectName": "temp_43be885e"
},
{
"type": "java",
"name": "Main",
"request": "launch",
"mainClass": "com.Main",
"projectName": "temp_43be885e"
}
]
}
It doesn't happens a lot when I try to reproduce it.
Java Language Server Log
!ENTRY java-debug 4 0 2023-06-22 18:15:38.087
!MESSAGE [error response][launch]: Failed to launch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutException
!STACK 0
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(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
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(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Additional Informations
- It occurs completely randomly, and can be for any java code.
- Cleaning java workspace could temporarily fix.
- Downgrading the extension to 0.50.0 doesn't fix it. It didn't occur to me in the few months ago.
- Downgrading the extension to 0.49.0 and 0.46.0, doesn't seem to be able to reproduce (but it's hard to tell because it is random).
- Adding
"java.debug.settings.console":"internalConcole"inUser/settings.jsonseems to fix it, but I cannot use the terminal to enter inputs now. reference
### Tasks
- Dominant language
- TypeScript
- Stars
- 591
- Forks
- 429
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 19
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-java-debug
-
ai-triaged enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/vscode-java-debug#1689 · 2 comments ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 comment · 1 assignee ·
-
ai-triaged bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoft/vscode-java-debug#1658 · 1 comment ·
-
ai-triaged enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/vscode-java-debug#1628 · 3 comments ·
-
Feature support. Openai-triaged enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/vscode-java-debug#1616 · 1 comment ·
All issues in microsoft/vscode-java-debug
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100