forked from microsoft/vscode-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Debug NetCore
Ravikumar Palanisamy edited this page Dec 10, 2019
·
1 revision
-
Install the .NET Core SDK which includes support for attaching to the .NET Core debugger.
-
Install the C# VS Code extension which includes support for attaching to the .NET Core debugger in VS Code.
-
Mac users only: add
/usr/local/share/dotnet/sdk/NuGetFallbackFolderas a shared folder in your Docker preferences.

- If needed, create a .NET Core project with
dotnet new. - Open the project folder in VSCode.
- Wait until a popup shows, asking if you want to add required assets for debugging. Click "Yes":
- Open the command palette (F1 by default) and enter
Docker: Add Docker Files to Workspace.... If you have already dockerized your app, you can instead doDocker: Initialize for Docker debugging. Follow the prompts. - Switch to the debugging tab.
- Select the "Docker .NET Core Launch" launch profile.
- Optionally, set a breakpoint.
- Start debugging! (F5 by default)
For additional customization options, see the documentation on Tasks and Debugging.
Maintaining good quality documentation is a priority for the Docker extension team. If you find missing or inaccurate content, or if you'd like to extend the wiki with a topic or tutorial, please let us know by opening an issue.