VS Code - .NET Auto Attach
Enables a seamless debugging experience when working with dotnet-watch.
The ".NET Auto Attach" extension is created to enable a seamless debugging experience when working with dotnet-watch.
While dotnet-watch will rebuild and launch your application every time you change and store a file, you have to manually restart the debugger each time.
This is where ".NET Auto Attach" comes in and shines. After dotnet-watch restarts your application, it will attach the debugger to enable a seamless debugging experience while changing files on the fly.
Attach debugger if dotnet-watch reloads
Solutions and Workspaces with multiple projects
The extension supports solutions and workspaces with multi projects by letting you chose which project the auto-attacher should target.
The extension notices when a project is no longer debugged and offers to re-attache if desired.
- C# - C# for Visual Studio Code (powered by OmniSharp).
- Install the extension
- Restart VS Code and open the folder containing the project you want to work on.
Using the debugger
When your ".NET: Auto Attach Debug (dotnet-watch)" launch config is set up, you can debug your project. Pick the launch config from the dropdown on the Debug pane in Code. Press the play button or F5 to start.
The extension currently operates in only one mode - it can launch your project you want to debug with dotnet-watch.
Just like when using the normal C# debugger, you configure the mode with a .vscode/launch.json file in the root directory of your project.
You can create this file manually, or Code will create one for you if you try to run your project and it doesn't exist yet.
Sample launch config
"name": ".NET Core Watch",
Sample launch config for a specific project
The extension will normaly ask you which project should get launched when your workspace contains multiple projects.
However, you can pre-set which project should get launched.
"name": ".NET Core Watch: dotnet-test.console",
Release Notes & Known Issues
See the CHANGELOG.md for the details of changes for each version and known issues.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
Or the list of members.
This project is licensed under the MIT License - see the LICENSE.md file for details.