question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger ignores module filter for modules with embedded symbols

See original GitHub issue

Environment data

dotnet --info output: 5.0.200-preview.20601.7 VS Code version: 1.52.1 C# Extension version: ms-dotnettools.csharp-1.23.8 .omnisharp 1.37.6-beta.16

Steps to reproduce

  1. settings.json:
{
    "csharp.unitTestDebuggingOptions": {
    "allowFastEvaluate": true,
    "enableStepFiltering": true,
    "logging": {
      "programOutput": true,
      "elapsedTiming": true,
      "engineLogging": false,
      "exceptions": true,
      "moduleLoad": false,
      "threadExit": false,
      "browserStdOut": false,
      "processExit": true
    },
    "requireExactSource": true,
    "suppressJITOptimizations": true,
    "justMyCode": true,
    "symbolOptions": {
      "searchPaths": [],
      "searchMicrosoftSymbolServer": false,
      "searchNuGetOrgSymbolServer": false,
      "moduleFilter": {
        "mode": "loadOnlyIncluded",
        "includeSymbolsNextToModules": false,
        "includedModules": [
          "MyUnitTests.dll",
        ]
      }
    }
  }
}
  1. Enable All exceptions image
  2. Debug a test.
  3. Debugger breaks on non-user code. image

Expected behavior

Breakpoint settings should use symbolOptions or justMyCode setting. Or maybe we can have a different checkboxes for this.

Actual behavior

Symbols of xunit.runner.visualstudio.dotnetcore.testadapter.dll and xunit.runner.utility.netcoreapp10.dll are loaded and we see a breakpoint on exception inside the xunit code. I can’t disable All Exceptions because if an exception is thrown in a test, we don’t interrupt it with the User-Unhandled Exceptions setting.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Jan 6, 2021

I should add: I generally recommend to NOT enable it. There are a few scenarios where it makes sense, but especially if you have JMC on, it can result in confusing behavior (and this bug is a perfect example of that) and/or poor performance.

0reactions
gregg-miskellycommented, Jan 6, 2021

That option defaults to off in both Visual Studio and VS Code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symbol / PDB files in the Visual Studio debugger
Work with symbols in the Modules window​​ During debugging, the Modules window shows the code modules the debugger is treating as user code,...
Read more >
Debugging a Loadable Kernel Module - 2021.1 English - Xilinx
To debug a kernel module, set path mapping to map the module name to symbol file of the module. To see loaded modules,...
Read more >
Debug Information Not Available - Intel
When debug information is not available, the ability to use binary-to-source correlation prevents the display of source code. One or more of the...
Read more >
3. Using GHCi — Glasgow Haskell Compiler 9.4.4 User's Guide
When the * is used, GHCi ignores any pre-compiled object code and interprets the module. If you have already loaded a number of...
Read more >
Common WinDbg Commands (Thematically Grouped)
Load symbols for Module Load symbols for all modules !sym !sym !sym noisy !sym quiet. Get state of symbol loading. Set noisy symbol...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found