To debug into the .NET Runtime or Microsoft-provided open-source libraries, you must configure your launch.json file with specific debugger settings. This allows the debugger to download symbols from the Microsoft Symbol Server and prevents the runtime from using optimized code that would make stepping through source code difficult.
If you do not have a launch.json file, generate one by running .NET: Generate Assets for build and debug from the VS Code command palette.
Note: If your launch.json already contains an env property, add the COMPlus_ReadyToRun variable to the existing block instead of creating a duplicate env property.
"justMyCode": false,
"symbolOptions": {
"searchMicrosoftSymbolServer": true
},
"suppressJITOptimizations": true,
"env": {
"COMPlus_ReadyToRun": "0"
}