Search code examples
c#asp.netvisual-studio-2010class-librarybreakpoints

Step into a class library in asp.net using visual studio 2010


I'll start by saying that I have searched SO and not found an answer to my issue.

I want to place a breakpoint in my asp.net code behind, and when a method or function of a class library is being called, I would like to be able to step into the class library code.

I have added the class library code files to my asp.net solution file.

Attach to process does not work (the class library code behind does not come up). I have also confirmed that the pdb file exists in the \bin folder .... according to this post ASP.NET Class Library not hitting break points

This is my screenshot of processes: enter image description here

Any ideas how to go about stepping into the class library?


Solution

  • If you're running from debug, you should see the class library and the symbols loaded in the output window. Look for something that looks like the following:

    'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b2719ea1\480fba3f\assembly\dl3\c439d1ec\8c571aed_7e45cd01\MyClassLibrary.DLL', Symbols loaded.

    If you see your class library being loaded but it doesn't say "Symbols loaded" at the end, then it's not finding the .pdb file for some reason.

    Also, if you're running from debug, you can attach to WebDev.WebServer40.exe from the 'Attach to Proccess" box. But you shouldn't have to - if the symbols are loaded and you're running in debug mode you ought to be able to hit your breakpoint without explicitly attaching to the process.

    Are you able to hit breakpoints in code that's not in your class library?