简体   繁体   中英

View source code of built in function from inside Visual Studio 2017?

Is it possible to view the source code of a built-in function directly from visual studio 2017? For example if I want to view the source code of the WriteLine function, I selected it, right clicked it, and when I pressed on Go To Implementation , it gave me this message: 在此处输入图像描述

în Call stack you can choose something like "Show External Code", should resolve your problem.

What you need are the.pdb files. Every.dll needs a corresponding.pdb file that maps the.dll to the source code. For your example, System.Console, you need the.pdb file for mscorlib.

The following pages show how to load this pdb file https://social.msdn.microsoft.com/Forums/SECURITY/en-US/166c70e7-9e39-44bf-8e08-76231e59ec34/mscorlibpdb-not-loaded?forum=visualstudiogeneral "mscorlib.pdb not loaded" yet the mscorlib.dll is NOT missing

Optionally, if you feel risky enough, you can download the the c# project and try to compile the.pdb file your self https://referencesource.microsoft.com/download.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM