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

Agent fixes #45369

Draft
wants to merge 4 commits into
base: release/9.0.2xx
Choose a base branch
from
Draft

Agent fixes #45369

wants to merge 4 commits into from

Conversation

tmat
Copy link
Member

@tmat tmat commented Dec 8, 2024

Prepares agent for being shared between dotnet-watch and VS.

Addresses potential race condition that may occur when applying initial updates to the process. Previously the agent started listening for updates asynchronously in the startup hook. Updates that were performed before the process launched were therefore applied while the app was running. The app may have loaded and executed old code that was already updated before the app launched.

We now apply the initial set of updates synchronously, unless the debugger is attached, in which case the debugger is responsible for doing so.

Blocking for initial pipe connection also addresses potential race condition that may cause deadlock if breakpoints are placed to startup hooks and the agent is loaded by the debugger.

[TODO] Ensures that the agent's startup hook is the first one loaded by the runtime, so that no code runs before the agent applies initial updates.
[TODO] Implements static asset content updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Watch untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant