Skip to content

Add file-based program API for use by debugger #48905

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jjonescz
Copy link
Member

Follow up on #48749.

Debug functionality will need to know the target executable path to launch. This API provides that info.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label May 12, 2025
@jjonescz jjonescz marked this pull request as ready for review May 12, 2025 17:30
@jjonescz jjonescz requested review from Copilot and a team May 12, 2025 17:30
Copy link
Contributor

@Copilot 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 a file-based program API for debuggers by introducing a new run-api command and supporting changes in project building and command handling. Key changes include:

  • A new test (Api_RunCommand) for the run-api command.
  • Modifications to VirtualProjectBuildingCommand and RunCommand to support custom artifact paths and launch profile adjustments.
  • Updates to RunApiCommand, CommandFactoryUsingResolver, and Command to integrate the new API functionality.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Added test for verifying the run-api command output.
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs Integrated a CustomArtifactsPath property into the artifacts path resolution.
src/Cli/dotnet/Commands/Run/RunCommand.cs Made launch profile and internal methods nullable/internal to support the new API.
src/Cli/dotnet/Commands/Run/Api/RunApiCommand.cs Introduced new RunApiInput/Output types for the file-based API functionality.
src/Cli/dotnet/CommandFactory/CommandFactoryUsingResolver.cs Updated command creation to support custom environment variables.
src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs Enhanced the constructor and environment variable handling to track custom environment values.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jjonescz jjonescz requested review from RikkiGibson and chsienki May 13, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants