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
{{ message }}
Repository navigation
Unable to start Java debugging: Unable to wait on tcp due to maxmium timeout reached #1460
Extension Name: vscode-gradle
Extension Version: v3.13.5
OS Version: Windows 11 22H2
VSCode version: 1.85.0
Describe the bug
debug task bootRun. It need a few minutes to compile the program, and it timed out in about 1 minute, and then the task stopped.
To Reproduce
debug task bootRun
Expected behavior
wait the program compiled and start debug
Screenshots
Output from "Gradle for Java"
[warn] [gradle-server] Adding ics-cs-rebirth-startup:cleanBootRun to ensure task output is cleared before debugging
[error] Unable to start Java debugging: Unable to wait on tcp due to maxmium timeout reached
[info] Cancel build: Cancel build requested
[info] Build cancelled: ics-cs-rebirth-startup:bootRun: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.9.1-bin.zip'.
[info] Completed build: ics-cs-rebirth-startup:bootRun
Does the bug still exist if you disable all other extensions?
Yes
Additional context
Is there any configuration item that can set the timeout? I didn't find it in the instructions. Debugger for Java Extension's configuration has a timeout setting, I set it to 300000ms, but it has no effect.
If I execute the build task first and then debug the bootRun task, I can debug normally.
Looks like the current implementation is using an infinite loop with a 1 min timeout to check if the debug port is open.
A better solution should be listen the output of the task, when the sentence: Listening for transport dt_socket at address: xxx appear, then start the debug session.
Hi woden17 (@dwhmofly), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
The Gradle extension uses a hard-coded 10 s TCP wait in waitOnTcp(), and there is currently no setting to increase it. You have two options:
• Workaround: Run your Gradle build (bootRun) first (e.g. via the built-in VS Code “Run Task”), then attach the debugger to the already-running process.
• Patch locally: in your VS Code extensions folder, edit vscode-gradle/.../util/index.ts, change the total timeout (currently 10_000 ms) passed to waitOnTcp(), then reload the extension.
If you’d like an official timeout setting, please file an enhancement request against the Gradle for Java extension.
High-confidence reference:
• Issue #1258: shows the waitOnTcp() implementation with a fixed 10 s timeout #1258 (comment)
Other references with low confidence
• Issue #669: timeout exception in Java Debug when changing default terminal—different code path (Java Debug extension) microsoft/vscode-java-debug#669
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
Activity
jdneo commentedon Dec 12, 2023
The timeout defined in code is here:
vscode-gradle/extension/src/util/index.ts
Line 12 in 18354a0
Looks like the current implementation is using an infinite loop with a 1 min timeout to check if the debug port is open.
A better solution should be listen the output of the task, when the sentence:
Listening for transport dt_socket at address: xxxappear, then start the debug session.github-actions commentedon Nov 5, 2025
Hi woden17 (@dwhmofly), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
The Gradle extension uses a hard-coded 10 s TCP wait in
waitOnTcp(), and there is currently no setting to increase it. You have two options:• Workaround: Run your Gradle build (
bootRun) first (e.g. via the built-in VS Code “Run Task”), then attach the debugger to the already-running process.• Patch locally: in your VS Code extensions folder, edit
vscode-gradle/.../util/index.ts, change thetotal timeout(currently 10_000 ms) passed towaitOnTcp(), then reload the extension.If you’d like an official timeout setting, please file an enhancement request against the Gradle for Java extension.
High-confidence reference:
• Issue #1258: shows the
waitOnTcp()implementation with a fixed 10 s timeout#1258 (comment)
Other references with low confidence
• Issue #669: timeout exception in Java Debug when changing default terminal—different code path (Java Debug extension)
microsoft/vscode-java-debug#669
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
mayamalkoti-xceedance commentedon Jul 28, 2026
their is only dist in my version of this extension