Skip to content

Go delve impl#6

Merged
akiselev merged 3 commits intomasterfrom
go-delve
Jan 21, 2026
Merged

Go delve impl#6
akiselev merged 3 commits intomasterfrom
go-delve

Conversation

@akiselev
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 21, 2026 03:55
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @akiselev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the debugger's capabilities by adding full support for the Go debugger, Delve. It achieves this by introducing a flexible transport layer for the Debug Adapter Protocol, allowing debuggers to communicate over either standard I/O or TCP sockets. The changes also refine the information provided during debugger stop events and improve the reliability of debugger control commands by handling potential stale events.

Highlights

  • Go Delve Debugger Support: Implemented comprehensive support for the Go debugger, Delve, by integrating a TCP-based communication mechanism for the Debug Adapter Protocol (DAP).
  • DAP Transport Mode Abstraction: Introduced a TransportMode enum (Stdio and Tcp) and integrated it into the AdapterConfig, allowing flexible selection of communication channels for debug adapters.
  • Enhanced Stop Event Information: Improved the StopResult by including precise source file, line, and column information, which is now fetched via a stack trace when a debugger session stops.
  • TCP-based DAP Client: The DapClient was refactored to support TCP connections, including spawning adapters with a --listen flag, parsing listening addresses from stdout, and establishing TCP streams for communication.
  • Event Draining on Resume: Added logic to drain stale events from the event queue after continue, next, step_in, and step_out commands to prevent unexpected behavior and ensure accurate debugger state.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for TCP-based Debug Adapter Protocol (DAP) communication, primarily for the Delve (Go debugger). Key changes include adding a TransportMode configuration, refactoring the DapClient to handle both Stdio and TCP transports, updating session management to utilize the new transport mode, and enhancing event handling to provide more detailed stop information. The installer verification process for Delve has also been updated to reflect its TCP communication. Overall, the changes are well-structured and improve the flexibility and robustness of the debugger's interaction with various DAP adapters.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 859a14d64c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the Delve debugger (Go) by implementing TCP-based DAP adapter communication as an alternative to the existing stdio-based approach.

Changes:

  • Adds TCP transport mode for DAP adapters that use network sockets instead of stdin/stdout
  • Implements TCP connection handling in both the verifier (for setup checks) and the DAP client
  • Adds Go/Delve-specific launch configuration (mode parameter for precompiled binaries)
  • Improves await command to return source location information in stop events
  • Adds event draining to prevent stale stop events during stepping operations

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/common/config.rs Adds TransportMode enum (Stdio/TCP) for adapter configuration
src/setup/verifier.rs Implements verify_dap_adapter_tcp and send_initialize_tcp for TCP-based adapter verification
src/setup/adapters/delve.rs Updates Delve installer to use TCP verification instead of stdio
src/dap/client.rs Adds DapWriter enum and spawn_tcp method for TCP-based adapter communication, including address parsing and connection logic
src/dap/types.rs Adds mode field to LaunchArguments for Delve-specific launch modes
src/daemon/session.rs Implements transport mode selection, Go adapter detection, and event draining for stepping operations
src/daemon/handler.rs Enhances await command to fetch and return stack trace information with stop events
src/ipc/protocol.rs Adds serde defaults to StopResult fields for backward compatibility
tests/e2e/run_tests.py Configures Go adapter with TCP transport mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akiselev akiselev merged commit f8c8c7b into master Jan 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants