Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

ClosedConnectionException when trying to debug certain Appsody templates in VSCode Windows #300

Closed
naveenkaratekid opened this issue Aug 27, 2019 · 8 comments
Assignees
Labels
area/appsody Appsody in Codewind kind/bug

Comments

@naveenkaratekid
Copy link

naveenkaratekid commented Aug 27, 2019

Codewind version: 0.3.0
OS: Windows 10
IDE version:1.37.1

Description:
Error being thrown when I attempt to debug any of the following Appsody templates:

  • Springboot Default
  • Microprofile
  • Springboot Kotlin

Whenever I try to debug any of the templates I listed above, after a few moments, I get a popup that says

"Failed to attach to remote debuggee VM. Reason: com.jdi.spi.ClosedConnectionException

VSCode debug failed ClosedConnectionException

Steps to reproduce:

  1. Create a project from one of the Appsody templates mentioned above
  2. Once it's created, right click the project, and then select "Restart in Debug Mode"

launch.json
@jagraj

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Appsody: Attach java debugger",
            "type": "java",
            "request": "attach",
            "hostName": "localhost",
            "port": 5005
        }
    ]
}
@sghung sghung added the area/appsody Appsody in Codewind label Aug 27, 2019
@keithchong
Copy link

This appears to be a dup of #239

@keithchong
Copy link

After you see the message, run the Attach Debugger action manually.

@sghung
Copy link
Contributor

sghung commented Aug 28, 2019

@naveenkaratekid
Copy link
Author

@keithchong Once I saw the error message, I performed the workaround as you suggested.

After I restarted the project in Debug mode, I right clicked on the project, and then selected Attach Debugger, and I got a similar error message but with a different reason: Failed to attach remote debuggee VM. Reason: java.net.ConnectException: Connection refused: connect

failed to attach remote debugee when manually attaching debugger

@keithchong
Copy link

Run the attach debugger command again. If the issue persists after a few attempts, restart the project in Debug mode a second time.

@naveenkaratekid
Copy link
Author

naveenkaratekid commented Aug 28, 2019

After verifying the issue in Mac and Windows, myself, @DavidG1011, and @sujeilyfonseca got the issue fixed using the workaround that was provided to us. In Windows, there is a different workaround we discovered: start by entering debug mode. Let the process finish, and expect it to fail (already documented that it will fail the first time). Wait for the restart notification on the bottom bar to fade away. Then, manually set the debugger.

@sishida

@makandre
Copy link
Contributor

Can this be closed?

@naveenkaratekid
Copy link
Author

Yes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/appsody Appsody in Codewind kind/bug
Projects
None yet
Development

No branches or pull requests

5 participants