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: forward initializeRequest to delve dap to verify capabilities #822

Closed
hyangah opened this issue Oct 21, 2020 · 3 comments
Closed
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Oct 21, 2020

The thin dlvDapAdapter2 currently handles initializeRequest because delve hasn't been
launched yet. Delve will start responding to DAP requests after launchRequest is received.
This is not ideal - delve should be the one that tells us about its capabilities.

From the current comment:

		// We respond to InitializeRequest here, because Delve hasn't been
		// launched yet. Delve will start responding to DAP requests after
		// LaunchRequest is received, which tell us how to start it.

		// TODO: we could send an InitializeRequest to Delve when
		// it launches, wait for its response and sanity check the capabilities
		// it reports. Once DAP support in Delve is complete, this can be part
		// of making sure that the "dlv" binary we find is sufficiently
		// up-to-date to talk DAP with us.
@hyangah hyangah added Debug Issues related to the debugging functionality of the extension. DelveDAP labels Oct 21, 2020
@polinasok
Copy link
Contributor

If you launch or attach to delve in or before the initialize request (before the decision to add a thin adapter we considered launching delve in goDebugConfiguration where we have access to the launch attributes), then you can get capabilities in real time. Another option is to leave everything as is, only sending back the most minimal set of capabilities from the thin adapter (e.g. configuration done only), then do the forwarding that the comment talks about and communicate back to the editor what the reality is with Capabilities event.

@polinasok polinasok changed the title debug: forward initializeRequest to delve dap debug: forward initializeRequest to delve dap to verify capabilities Oct 27, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/268460 mentions this issue: src/debugAdapter2: supply launch in the debug session creation time

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/290449 mentions this issue: src/debugAdapter2: remove thin adapter for dlv-dap

@hyangah hyangah added this to the v0.23.0 milestone Mar 2, 2021
@golang golang locked and limited conversation to collaborators Mar 2, 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

4 participants