-
Notifications
You must be signed in to change notification settings - Fork 942
Enable JavaScript/TypeScript AppHost debugging with IGuestProcessLauncher strategy #15091
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
adamint
merged 23 commits into
microsoft:release/13.2
from
adamint:dev/adamint/js-apphost-run-debug
Mar 10, 2026
Merged
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
764d440
Revert "Support debugging browser and JavaScript apps in 13.2 (#14686)"
adamint d81c69a
Remove withDebugging() call from Python ValidationAppHost
adamint 852f3fb
Regenerate CompatibilitySuppressions.xml for API compat
adamint ab65402
removed apis
adamint fa2fd60
Minimal JavaScript debugging support modeled after Python implementation
adamint fb14e7a
Add browser debugging support and fix duplicate 'run' in node debugger
adamint e71c3a9
Deferred launch configuration pattern with tests
adamint ec4195a
Merge remote-tracking branch 'upstream/release/13.2' into dev/adamint…
adamint 5c338b8
Fix post-merge build errors and remove DCP log artifacts
adamint 8202992
Extract IGuestProcessLauncher strategy for guest AppHost process laun…
adamint c3abf51
Localize Browser display name strings
adamint 7feccfe
Apply playground changes from PR adamint/aspire#10
adamint 69cf96a
make sealed
adamint 38b1fad
Fix CS0436: Remove linked source files duplicated via InternalsVisibleTo
adamint edb8423
Fix CI failures: InternalsVisibleTo, cross-platform path, deferred en…
adamint 9b67592
Address code review: fix browser debug type, delete cwd, clarify Firs…
adamint a0d7f28
add language guard to extension guest apphost launcher
adamint c072113
Add property to RuntimeSpec to advertise necessary capability to laun…
adamint 7072bc2
update xlf
adamint a897300
Add tests for ExtensionLaunchCapability on GuestRuntime
adamint ade4c09
Remove PR-specific versions from sample and add null guard for _guest…
adamint 36b36e1
only ignore connection loss in extension mode in run command
adamint 740850f
add comment
adamint 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,38 @@ | ||
| import { AspireResourceExtendedDebugConfiguration, ExecutableLaunchConfiguration, isBrowserLaunchConfiguration } from "../../dcp/types"; | ||
| import { browserDisplayName, browserLabel, invalidLaunchConfiguration } from "../../loc/strings"; | ||
| import { extensionLogOutputChannel } from "../../utils/logging"; | ||
| import { ResourceDebuggerExtension } from "../debuggerExtensions"; | ||
|
|
||
| export const browserDebuggerExtension: ResourceDebuggerExtension = { | ||
| resourceType: 'browser', | ||
| debugAdapter: 'pwa-msedge', | ||
| extensionId: null, // built-in to VS Code via js-debug | ||
| getDisplayName: (launchConfiguration: ExecutableLaunchConfiguration) => { | ||
| if (isBrowserLaunchConfiguration(launchConfiguration) && launchConfiguration.url) { | ||
| return browserDisplayName(launchConfiguration.url); | ||
| } | ||
| return browserLabel; | ||
| }, | ||
| getSupportedFileTypes: () => [], | ||
| getProjectFile: () => '', | ||
| createDebugSessionConfigurationCallback: async (launchConfig, _args, _env, _launchOptions, debugConfiguration: AspireResourceExtendedDebugConfiguration): Promise<void> => { | ||
| if (!isBrowserLaunchConfiguration(launchConfig)) { | ||
| extensionLogOutputChannel.info(`The resource type was not browser for ${JSON.stringify(launchConfig)}`); | ||
| throw new Error(invalidLaunchConfiguration(JSON.stringify(launchConfig))); | ||
| } | ||
|
|
||
| debugConfiguration.type = launchConfig.browser || 'msedge'; | ||
| debugConfiguration.request = 'launch'; | ||
| debugConfiguration.url = launchConfig.url; | ||
| debugConfiguration.webRoot = launchConfig.web_root; | ||
| debugConfiguration.sourceMaps = true; | ||
|
adamint marked this conversation as resolved.
Outdated
|
||
| debugConfiguration.resolveSourceMapLocations = ['**', '!**/node_modules/**']; | ||
| // Use an auto-managed temp user data directory so multiple browser debuggers | ||
| // can run concurrently without conflicting | ||
| debugConfiguration.userDataDir = true; | ||
|
|
||
| // Remove program/args/cwd since browser debugging doesn't use them | ||
| delete debugConfiguration.program; | ||
| delete debugConfiguration.args; | ||
| } | ||
|
adamint marked this conversation as resolved.
|
||
| }; | ||
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.