Search code examples
debuggingvisual-studio-2022c#-native-library

Visual Studio 2022 Debugger stepping into native C# libraries


I recently upgraded my Visual Studio 2022 to Version 17.7.4 and since then (I think), whenever I am trying to debug my application, the debugger is stepping into native C# library code like StringBuilder.cs and DateTime.cs etc.

So whenever it is encountering DateTime.Now, it goes into DateTime.cs and if it encounters formatted string, it is going into String.cs, StringBuilderCache.cs and StringBuilder.cs etc.

Am I missing anything or is it the new Visual Studio feature/option which I can disable?

I would really appreciate if someone can point me in the right direction.

Thank you!

I am not sure what to do.


Solution

  • I was finally able to resolve this by enabling Just my code debugging option from Tools -> Options -> Debugging General -> Enable Just My Code.

    I accidently disabled it from the Visual Studio pop-up with option to disable Just My Code debugging.

    Just My Code Warning