-
Notifications
You must be signed in to change notification settings - Fork 985
Expose resolved environment variables to debug launch producers #19077
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
Merged
Adam Ratzman (adamint)
merged 33 commits into
microsoft:main
from
adamint:adamint/issue-18956-launch-config-context
Aug 13, 2026
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
36a5310
Document launch configuration callback context design
fc48eb7
docs: add launch configuration callback plan
ad326ea
Add launch configuration callback context
bfb9027
Fix launch producer restart handling
9a8c99a
Reset debug execution before rebuilding arguments
e9ea853
Migrate debug launch configuration producers
9efdff8
Finalize debug callback context API
65a56a7
Migrate debug support playground
ac32975
Fix debug support documentation whitespace
b0fcfd3
Address callback context review findings
8de33ce
Remove agent planning artifacts and restore load-bearing comments
900a331
Fix MAUI launch configuration regression and rename PrepareObjects
7d4d8fe
Address launch configuration context review
0ee07ef
Install Azure Functions Core Tools from release archive
2db433e
Recompute debug argument callbacks after original snapshot
6cb79d3
Validate legacy debug producer return type
1481f78
Revert unrelated Azure Functions tool install change
dcf4b09
Preserve launch override process args
024577a
Fix debug executable configuration snapshots
adamint 24588ab
Reuse original argument resolutions across the debug rewrite
adamint 5b8d2f3
Address review findings on debug launch configuration
adamint 92901b8
Fix debug argument rewrite reuse and legacy overload validation
adamint 64dd50d
Address debug launch context review feedback
3b95b28
Merge branch 'main' into adamint/issue-18956-launch-config-context
adamint a904ac7
Prevent later arg mutations from stripping debug-injected arguments
30d272c
Narrow debug launch context to resolved environment
35bea19
Clarify process-mode launch producer behavior
fa5c96c
Fix launch-override producer wiring
c5855b8
Clarify asynchronous debug producer guidance
7cdb91a
Cover the no-fallback rule when a launch configuration producer throws
b739005
Merge branch 'main' into adamint/issue-18956-launch-config-context
629c3ea
Merge remote-tracking branch 'upstream/main' into adamint/issue-18956…
a506a7a
Restore launch configuration inspection API
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/Aspire.Hosting/ApplicationModel/LaunchConfigurationCallbackContext.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Diagnostics.CodeAnalysis; | ||
|
|
||
| namespace Aspire.Hosting.ApplicationModel; | ||
|
|
||
| /// <summary> | ||
| /// Provides the runtime data used to create a launch configuration for a resource. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Aspire creates this context after resolving the execution configuration for a specific executable | ||
| /// creation. Environment variable values may contain secrets; only copy values into the launch | ||
| /// configuration when the IDE requires them. | ||
| /// </remarks> | ||
| [Experimental("ASPIREEXTENSION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")] | ||
| public sealed class LaunchConfigurationCallbackContext | ||
| { | ||
| internal LaunchConfigurationCallbackContext( | ||
| string mode, | ||
| IResource resource, | ||
| IReadOnlyDictionary<string, string> environmentVariables, | ||
| CancellationToken cancellationToken) | ||
| { | ||
| ArgumentNullException.ThrowIfNull(mode); | ||
| ArgumentNullException.ThrowIfNull(resource); | ||
| ArgumentNullException.ThrowIfNull(environmentVariables); | ||
|
|
||
| Mode = mode; | ||
| Resource = resource; | ||
| EnvironmentVariables = environmentVariables; | ||
| CancellationToken = cancellationToken; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the requested launch mode, one of the values on <see cref="ExecutableLaunchMode"/>. | ||
| /// </summary> | ||
| public string Mode { get; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the resource being launched. | ||
| /// </summary> | ||
| public IResource Resource { get; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the resolved environment variables used for this executable creation. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Values can contain secrets. Aspire serializes only the launch configuration returned by the | ||
| /// producer; integrations should copy only values required by the IDE. | ||
| /// </remarks> | ||
| public IReadOnlyDictionary<string, string> EnvironmentVariables { get; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the cancellation token for this executable creation. | ||
| /// </summary> | ||
| public CancellationToken CancellationToken { get; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.