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.
[docs] Document project serverReadyAction override in VS Code extension #1459
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
base: release/13.5
Are you sure you want to change the base?
[docs] Document project serverReadyAction override in VS Code extension #1459
Changes from all commits
2e8a9a7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contradicted on
release/13.5(this PR's target branch).This sentence says setting
project.serverReadyActionoverrides the generated default. Onrelease/13.5it does not take effect. Inextension/src/debugger/debuggerExtensions.tsthe user'sdebuggers['project']block — includingserverReadyAction— is merged into the config first:…and only after that is the language callback invoked (
debuggerExtensions.ts:83). That callback, inextension/src/debugger/languages/dotnet.ts, then unconditionally reassignsserverReadyActionfor every non-AppHost project:determineServerReadyAction(launchProfiles.ts:368-370) does not consider any existing value — it returnsundefinedwhenlaunchBrowser/applicationUrlaren't set, otherwise anopenExternallydefault. So the user-supplied action is discarded in every case, and nothing re-applies it after the callback (the function returnsconfigurationat line 87).The guard that makes this override work —
&& debugConfiguration.serverReadyAction === undefined— exists onmain, but not onrelease/13.5. Either that code change needs to be ported torelease/13.5, or this documentation should target the release where it actually ships.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we fix or call out the AppHost behavior before documenting this? A .NET AppHost also has launch type
project, anddebuggers.projectis applied afterdebuggers.apphost, so thisserverReadyActionis preserved on the AppHost too. I think that means this can open on AppHost output instead of only child projects.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unverifiable on
release/13.5. The valueopenIntegratedBrowser(and this exactpattern) does not appear anywhere in the extension source or tests on this branch. The onlyserverReadyActionaction the extension produces or tests onrelease/13.5isopenExternally(extension/src/debugger/launchProfiles.ts:380). This exact example —action: 'openIntegratedBrowser'withpattern: 'Now listening on:\\s+\\[?(https?://[^\\]\\s]+)'— is present only onmain(e.g.extension/src/test/dotnetDebugger.test.ts), which is additional evidence that the override feature this example illustrates has not yet shipped inrelease/13.5.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern truncates IPv6 URLs at the closing bracket. For
Now listening on: http://[::1]:5000, the capture ishttp://[::1, soopenIntegratedBrowsergets an invalid URL. Could we use a pattern that retains brackets inside the URL, or reuse the extension defaulthttps?://\\S+?Uh oh!
There was an error while loading. Please reload this page.