Skip to content

debug: show errors when remote connection fails #215

@vvvjo

Description

@vvvjo

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.14.3 darwin/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.46.0
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.14.4

Describe the bug

json-rpc2 module doesn't catch all the errors in its callback in this line of code: https://github.com/golang/vscode-go/blob/master/src/debugAdapter/goDebug.ts#L597.

Basically if a remote connection fails, it won't call the callback for errors. So the connection hangs when we use vscode-go debugger. There is no future plan to handle this case: pocesar/node-jsonrpc2#53.

One way I've experimented and had success with is something like:

client.on('error', (error) => {
     reject(error);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebugIssues related to the debugging functionality of the extension.FrozenDueToAge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions