Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: duplicate notifications about missing dlv-dap when debug test codelens is used #1426

Closed
hyangah opened this issue Apr 15, 2021 · 3 comments
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Apr 15, 2021

Extension version: v0.24.1-rc.3
no dlv-dap installed

How to repro:

  • make sure dlv-dap isn't installed in the system.
  • enable dlv-dap from settings.json,
"go.delveConfig": {
        "debugAdapter": "dlv-dap",
 }
  • click any 'debug test' codelens from a test go file.

What I expected to see:
Extension suggesting dlv-dap installation.

What I saw instead:
Extension triggered duplicate notification popups with no clear tool installation instruction.
Screen Shot 2021-04-15 at 11 59 17 AM

In DEBUG CONSOLE, I saw error message like "Couldn't find dlv-dap at the Go tools path, /Users/hakim/go, /Users/hakim/go or ..." followed by the same "connect to server error:..." error messages.

@hyangah hyangah added Debug Issues related to the debugging functionality of the extension. DlvDAP labels Apr 15, 2021
@hyangah hyangah added this to the Backlog milestone Apr 15, 2021
@suzmue
Copy link
Contributor

suzmue commented Apr 15, 2021

I think this is because we attempt to connect each time a message is sent to the server, which I think happens twice on startup. To fix this we can add some code to only attempt to connect once.

@suzmue suzmue self-assigned this Apr 15, 2021
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/310517 mentions this issue: src/goDebugFactory.ts: send the first error when starting dlv-dap

@hyangah hyangah modified the milestones: Backlog, v0.24.2 Apr 16, 2021
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/311452 mentions this issue: [release] src/goDebugFactory.ts: send the first error when starting dlv-dap

gopherbot pushed a commit that referenced this issue Apr 19, 2021
…lv-dap

For every message that the thin adapter needs to forward to dlv-dap,
the thin adapter needs to make sure it can connect to the server. If
there was an error connecting to the server it will send an error
message and a terminated event so the client knows the debug session
is not active. If multiple messages are sent to the server, the user
gets shown multiple error messages. This change records whether we
have already sent a terminated event because of an error, and will
not send duplicate error messages.

Fixes #1426

Change-Id: I8b81959b529f3802c9aa2cbebdbe8008af5902b3
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/310517
Trust: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
(cherry picked from commit bd55732)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311452
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
@golang golang locked and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants