J
J
Just_Graf2018-03-04 17:25:36
C++ / C#
Just_Graf, 2018-03-04 17:25:36

I want to "step" all the C# code in VS, how to do it?

Hello! I think experienced programmers can help me. Here's the thing... You probably know better than me that you can "step through" the code you wrote in VS? That is, you press F11 and you see how each line of code is executed, when the compiler goes (I don’t know for sure whether the compiler does this or not, correct me) yes, and when it goes to the method that you wrote, then the transition is made to method and you see how the body of this method is executed ... But this will not work with methods or properties, etc., which are written by the developers of the C# language. And I, of course, want to see how the bodies of these methods are executed, I want to see what is written there ... I want this so much that I interrupted my experiments with C #, inserted the router into the computer and write this text : ). Help, dear, experienced programmers!) Or those

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eRKa, 2018-03-04
@Just_Graf

The easiest way, in my opinion, to see what's inside, is through Resharper and its Decompile methods function.
It is located options / External Sources and put all the checkmarks inside Navigation to Sources.
If without Resharper, then in order to debug the .net sources, you must have debug pdb files downloaded. To do this, you also need to make some settings in vs.
First of all, it is desirable to set the server for downloading debugging symbols Tools/options/Debugging/Symbols, check the Microsoft Symbol Servers checkbox, you can immediately specify the folder for caching your symbols and click the Load all Symbols button so that they are not loaded again every time the project is launched.
Next, go to Tools/options/Debugging/General and check the Enable .NET Framework source stepping checkboxes. You will immediately be asked whether to load the debug symbols, to which you agree. In this case, you will disable the "only my code" option.
To debug third-party libraries, for this, the authors must provide their debugging symbols, which I have not yet seen) Although there are resources where people post them for general use.
I recently answered this question here .

I
IvankoPo, 2018-03-04
@IvankoPo

If you want to look at the code of the method, you can hover over it with the mouse in the code, click on the right mouse button and select go to the definition in the context menu and you will be transferred to the file where that function is written

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question