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

Simplify debugging the agent and the extension at the same time (full-stack) #2516

Merged

Conversation

sagerb
Copy link
Collaborator

@sagerb sagerb commented Jan 8, 2025

… of the UX and the agent

Intent

This PR updates the launch configuration for the vscode extension, to have two targets:

  • Debug with internal API agent
  • Debug with external API agent on 9001

The first one maintains the functionality we had before, but the second one supports the ability to launch the VSCode extension so that it expects there is an external (independently managed) API agent at port 9001.

services.ts has been updated to implement this functionality, but by default, will continue its prior behavior of managing the agent process itself. The functionality is protected by also checking that it has been launched in development mode so that we will not have this functionality leak out to customers.

I have updated the extensions/vscode/CONTRIBUTING.md file to reflect these changes.

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

User Impact

Functionality is not exposed to customers by limiting extension logic to require execution in development mode.

Automated Tests

Not applicable

Directions for Reviewers

  1. Confirm prior debugging capability is still maintained by using the launch configuration named Debug with internal API agent
  2. Confirm new debugging capability works by following the updated steps within extensions/vscode/CONTRIBUTING.md for Debug with external API agent on 9001.
  3. Build the extension and install the vsix file into a normal running VSCode instance. Confirm that the extension launches and talks with the agent, by viewing activity within the Publisher Output window.

Checklist

@sagerb sagerb added this to the v1.8.0 milestone Jan 8, 2025
@sagerb sagerb self-assigned this Jan 8, 2025
Copy link
Collaborator

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

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

All of my review comments are nitpicks or questions. This is fantastic. Thanks for putting the work into this to make it easier to do.

extensions/vscode/.vscode/launch.json Show resolved Hide resolved
extensions/vscode/.vscode/launch.json Outdated Show resolved Hide resolved
extensions/vscode/src/extension.ts Outdated Show resolved Hide resolved
extensions/vscode/CONTRIBUTING.md Show resolved Hide resolved
extensions/vscode/CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding the notes for how to accomplish simultaneous debugging 🎉

Copy link
Collaborator

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes, and for getting this in. It will be so helpful 🎉

@sagerb sagerb merged commit 746a2a3 into main Jan 9, 2025
14 checks passed
@sagerb sagerb deleted the sagerb-add-extension-debug-configuration-for-external-agent branch January 9, 2025 19:39
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