Skip to content

Failed to launch debuggee in terminal with TransportTimeoutException on Mac #1278

@xin911

Description

@xin911

output:
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)

--- terminal output:
ERROR: transport error 202: connect failed: Operation timed out
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

Why transports not initialized..?
How to initialize transports correctly?

Environment
  • Operating System: Mac 10.15.7
  • JDK version:1.8
  • Visual Studio Code version:1.74.2
  • Java extension version:v0.40.2 0(Maven for Java)
  • Java Debugger extension version:v0.47.0(Debugger for Java)
Steps To Reproduce
  1. open Test.java, write helloworld, and click debug CodeLens

[attach a sample project reproducing the error]
attach logs

Current Result

image

Expected Result
Additional Informations

terminal error:
/usr/bin/env /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java -age
ntlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:53567 -cp /var/folders/ky/y9rt99sn6tb61yy6yr7thpjw0000gp/T/cp_cpk4v9ggyl99nrk9hupdd9ium.jar com.ziroom.finance.monitormanage
r.configuration.Test
ERROR: transport error 202: connect failed: Operation timed out
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

try:
1、add this line (, "java.debug.settings.console": "internalConsole")
alert: Failed to launch debuggee VM. Reason: VM did not connect within given time: 10000 ms
ERROR: transport error 202: connect failed: Operation timed out
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
output:
Failed to launch debuggee VM. Reason: VM did not connect within given time: 10000 ms
Failed to launch debuggee VM. Reason: VM did not connect within given time: 10000 ms
com.microsoft.java.debug.core.DebugException: Failed to launch debuggee VM. Reason: VM did not connect within given time: 10000 ms
at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.launch(LaunchRequestHandler.java:320)
at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.handleLaunchCommand(LaunchRequestHandler.java:187)
at com.microsoft.java.debug.core.adapter.handler.LaunchRequestHandler.handle(LaunchRequestHandler.java:89)
at com.microsoft.java.debug.core.adapter.DebugAdapter.lambda$dispatchRequest$0(DebugAdapter.java:93)

JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
2、 try to add "shortenCommandLine": "jarmanifest" in launch.json
output:
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions