Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symbol status showing "Skipped Loading" for dll in modules window?

I've recently upgraded some solution(s) to Visual studio 2013. All went OK apart from one which now generates the:

Symbol for the modules 'name' were not loaded.

...error every time I run it.

When I look in the modules debug window I can see against the dll (It's a web service dll)

Name           Path                       Optimised    User Code    Symbol Status
dllName.dll    Tempoary ASP.Net...etc.    Yes          No           Skipped Loading...

If I look in the \bin I see the dll and it's coresponding .pdb file.

Checking the build menu for the project I can see Debug Info: full.

Cut a long story short everything looks fine to me except that it's not loading any symbols.

Any idea what I'm missing?

Update

It looks like if I run my solution though IIS express the issue goes away. But running though IIS (8) I still have this problem.

like image 994
Liam Avatar asked Sep 17 '14 10:09

Liam


People also ask

Why skipped loading symbols?

Symbols must match exactly with the module in order to be loaded. For instance if you have a module that is loaded and you ask debugger to load a pdb that was generated doing an earlier build of that module, VS will not load it.

How do I see loaded symbols in Visual Studio?

In Visual Studio, open Tools > Options > Debugging > Symbols (or Debug > Options > Symbols).

How do I stop the Visual Studio from loading symbols?

In general, to totally control what symbols are being loaded and when, check the checkbox called "Search the above locations only when symbols are loaded manually". Symbols will only be loaded when you ask for them to be loaded via the modules or callstack windows. Also, make sure you have a symbol cache specified.


1 Answers

After painfully comparing two project files, one that worked and one that didn't I noticed that the proj that worked had:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    **<Optimize>false</Optimize>**
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

Where as my one had

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    **<Optimize>true</Optimize>**
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>

  </PropertyGroup>

By setting the <Optimize> property to false all issues went away.

This answer also seems relevant as the .csproj.user file can be out of sync, I deleted it.

like image 187
Liam Avatar answered Oct 21 '22 13:10

Liam