Prevent Visual Studio from trying to load symbols for a particular DLL

前端 未结 8 1369
感动是毒
感动是毒 2020-12-23 16:10

I have Visual Studio 2005 set up to use Microsoft\'s symbol servers. I also have UltraMon installed, which injects a hook DLL into every process. Whenever I start debugging

相关标签:
8条回答
  • 2020-12-23 16:24

    You can't do this in a very fine grained fashion but you can disable automatic symbol loading and then manually choose the symbols to load via the Modules window (Debug -> Windows -> Modules).

    To Disable Automatic Symbol loading

    • Tools -> Options -> Debugging -> Symbols
    • Check "Search the above locations only when symbols are loaded manually"
    0 讨论(0)
  • 2020-12-23 16:27

    Also check that you have no "_NT_SYMBOL_PATH" environment variable. If you have this var symbols will load regardless of VS settings.

    0 讨论(0)
  • 2020-12-23 16:28

    Not only the _NT_SYMBOL_PATH can cause this behavior, but for me it was the _NT_ALT_SYMBOL_PATH environment variable that was causing the delays.

    (I believe I added this variable when experimenting with WinDbg)

    0 讨论(0)
  • 2020-12-23 16:31
    • Load all symbol packages from MS website manually, put them on a SSD drive for speed :-)
    • If you have a "_NT_SYMBOL_PATH" environment variable, remove the part "http://msdl.microsoft.com/download/symbols" from "SRVe:\symbols*http://msdl.microsoft.com/download/symbols", so you have only the symbol path where your symbols live preciously downloaded.
    • Now you have support for symbols but they wont be downloaded from MS, but loaded from drive
    0 讨论(0)
  • 2020-12-23 16:35

    In my case it was because I had set "Enable .Net Source Stepping" to true in

    Tools > Options > Debugging > General. 
    

    Rather than setting it to false, I set "Enable Just My Code" to true which automatically set "Enable .Net Source Stepping" to false. It gave me a warning before doing so:

    Enabling Just my code automatically disabled .Net framework source stepping
    

    Which suggests Just My Code and .Net source stepping are mutually exclusive.

    I hope this helps someone.

    0 讨论(0)
  • 2020-12-23 16:40

    From Visual Studio 2010 onwards, you can go to:

    Tools -> Options -> Debugging -> Symbols -> Specify excluded modules
    

    and enter the list of the dlls which take too long to load. I use the full path, given by the Output Window; maybe it accepts wildcards or simple file names.

    0 讨论(0)
提交回复
热议问题