Randomly Failed to lanuch debuggee in terminal: com.sun.jdi.connect.TransportTimeoutException
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- java, typescript, vscode
- 領域
- devtools
研究方向
從 LaunchWithDebuggingDelegate.java 第 147 行開始,這裡的堆疊追蹤回報了終端機啟動失敗。使用所示的 Test.java 程式重複輸入 1 進行重現,並比較啟用或停用終端機主控台設定時的行為。完成標準是重複啟動不再凍結或以 TransportTimeoutException 結束。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- TypeScript
- 星號
- 591
- 分支
- 431
- 平均合併
- 10 小時 25 分鐘
- 30 天內合併 PR
- 9
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-java-debug 的其他 Issue
-
java未關閉ai-triaged needs more info
難度 5/5 一週以上 新手友好度 1/100
microsoft/vscode-java-debug#1707 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
Stopping a Java Application with the debugger Stop button dos not work可能已有人在做 @chagong 於 13 天前認領。 未關閉ai-triaged bug
microsoft/vscode-java-debug#1705 · 1 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
ai-triaged enhancement
難度 3/5 1-2 天 新手友好度 55/100
microsoft/vscode-java-debug#1689 · 3 則留言 ·
維護者通常 1 天內回覆
-
Extension appends malformed string to PATH可能重新可做 @wenytang-ms 於 62 天前認領,目前沒有進行中的 PR。 未關閉ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
ai-triaged bug
難度 3/5 1-2 天 新手友好度 48/100
microsoft/vscode-java-debug#1658 · 1 則留言 ·
維護者通常 1 天內回覆
查看 microsoft/vscode-java-debug 的全部 Issue
相似的 Issue
-
area:deploy task
難度 2/5 1-3 小時 新手友好度 72/100
wilanis/wilanis-js#1017 ·
維護者通常 1 天內回覆
-
documentation v2
難度 2/5 1-3 小時 新手友好度 76/100
modelcontextprotocol/servers#5133 ·
維護者通常 1 天內回覆
-
budget bug feature frontend good-issue medium needs-review OSCI'26 payments
難度 2/5 1-3 小時 新手友好度 75/100
SatyamPandey-07/WorkSphere#5990 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
lugassawan/swe-workbench#799 ·
維護者通常 1 天內回覆
-
bug good first issue javascript
難度 2/5 1-3 小時 新手友好度 82/100
yukikotani231/sqlsift#326 ·
維護者通常 1 天內回覆