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

Update steps in debugging instruction of CLR #43557

Merged
merged 3 commits into from Oct 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/workflow/debugging/coreclr/debugging.md
Expand Up @@ -19,10 +19,16 @@ Debugging CoreCLR on Windows
7. Set Command Arguments=`<managed app you wish to run>` (e.g. HelloWorld.dll)
8. Set Working Directory=`$(SolutionDir)\..\..\..\bin\coreclr\Windows_NT.$(Platform).$(Configuration)`
1. This points to the folder containing CoreCLR binaries.
9. Press F11 to start debugging at wmain in corerun (or set a breakpoint in source and press F5 to run to it)
9. Set Environment=`CORE_LIBRARIES=$(SolutionDir)\..\..\..\bin\pkg\<current tfm>\runtime\Windows_NT-$(Configuration)-$(Platform)`,
huoyaoyuan marked this conversation as resolved.
Show resolved Hide resolved
where '\<current tfm\>' is the target framework of current branch, for example `netcoreapp3.1` `net5.0`.
1. This points to the folder containing core libraries except `System.Private.CoreLib`.
10. Right-click the INSTALL project and choose 'Build'
1. This will load necessary information from cmake to Visual Studio.
11. Press F11 to start debugging at wmain in corerun (or set a breakpoint in source and press F5 to run to it)
1. As an example, set a breakpoint for the EEStartup function in ceemain.cpp to break into CoreCLR startup.

Steps 1-8 only need to be done once, and then (9) can be repeated whenever you want to start debugging. The above can be done with Visual Studio 2013.
Steps 1-10 only need to be done once, and then (11) can be repeated whenever you want to start debugging. The above can be done with Visual Studio 2019 as writing.
Keeping with latest version of Visual Studio is recommended.

### Using SOS with windbg or cdb on Windows ###

Expand Down