Visual Studio Development Bookmark and Share   
 index > Visual Studio Debugger > VS2008 SP1 ASP.NET MVC C# PDB files not found. Debug impaired.
 

VS2008 SP1 ASP.NET MVC C# PDB files not found. Debug impaired.

Hi,
Environment: Server 2008 SP2 (64-bit), VS 2008 SP1, IIS7, SQL Server Exp 2005, Dotnet 3.5 SP1, ASP.NET MVC 1.0
I have a simple C# ASP.NET MVC solution based on the tutuorial at http://www.asp.net/learn/mvc/?lang=cs.
I had trouble debugging it from the start. With built-in (Cassini) server, whenever I hit F5, VS crashed.
So I ported the application to IIS7. This stopped the F5 crashing.
However, some breakpoints are completely ignored and Step Into(F11) sometimes acts like F10 (Step Over).
When F11 works, I usually see an assembly language page. Sometimes when I Step Out of the assembly code, an Open File dialog appears asking to locate the .cs file the debugger is attempting to load. Every time I've done this (located the file), I get a message stating that the code in the file I've located does not match the one used in the application.
If I look at the Modules tab after beginning debug, many of the PDB files for the system are not found or are not the correct version.
This is despite the fact that I have paths in the tools/options/debugger/symbols to locations where I have downloaded symbols and source matching my environment (from http://referencesource.microsoft.com/netframework.aspx).
If anyone has a clue, please help.
Regards,
Mike
cushlomockree  Tuesday, October 13, 2009 8:30 PM
Hi Mike,

Thanks for reporting this issue.

I suspect there are some settings incorrect in your Visual Studio. Can you please followng instructions in the link as below to setup the source debugging from scratch?
http://blogs.msdn.com/sburke/archive/2008/01/17/configuring-visual-studio-to-debug-net-framework-source-code.aspx

If the symbol is still not loaded correctly, please right click on the module and select to view the symbol load information. Check the paths and compare them with your symbol cache path. You'd better copy one of them here.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Marked As Answer bycushlomockree Wednesday, October 14, 2009 8:21 PM
  •  
Hongye Sun  Wednesday, October 14, 2009 6:10 AM
Hi Mike,

Thanks for reporting this issue.

I suspect there are some settings incorrect in your Visual Studio. Can you please followng instructions in the link as below to setup the source debugging from scratch?
http://blogs.msdn.com/sburke/archive/2008/01/17/configuring-visual-studio-to-debug-net-framework-source-code.aspx

If the symbol is still not loaded correctly, please right click on the module and select to view the symbol load information. Check the paths and compare them with your symbol cache path. You'd better copy one of them here.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Marked As Answer bycushlomockree Wednesday, October 14, 2009 8:21 PM
  •  
Hongye Sun  Wednesday, October 14, 2009 6:10 AM
Hi Hongye,

Thanks.
I did everything in the blog, and things have improved.

Several things remain a problem.

All breakpoints in Global.asax.cs are ignored.
If I attempt to Step-in(F11) at certain breakpoints for example at:
   
this._MovieSet = base.CreateQuery<Movie>("[MovieSet]");
cause a warning dialog that ultimately ends up doing nothing or displaying disassembly (because of lack of symbols and source).

Dialog:
Microsoft Visual Studio Warning
Message:
"The debugger must execute this untrusted command to obtain source code from source server"
sd.exe -p DDRTSD:4000 print -o "C:\Users\mike\AppData\Local\SOURCE~1Command:
\DEVDIV\depot\DevDiv\releases\Orcas\SP\ndp\fx\src\DataEntity\System\Data\Objects\ObjectContext.cs\4\ObjectContext.cs" -q //depot/DevDiv/releases/Orcas/SP/ndp/fx/src/DataEntity/System/Data/Objects/ObjectContext.cs#4

Message continued:
"If the symbol file is not from a Known....."
Buttons:
Run    Don't Run

The path in the command "C:\Users\mike\AppData\Local\SOURCE~1\DEVDIV\depot\DevDiv\releases\Orcas\SP\ndp\fx\src\DataEntity\System\Data\Objects\ObjectContext.cs\4\" exists, but the folder is empty (no ObjectContext.cs). There is also no symbol information, so I can only elect for disassembly.

In the above case I am attempting to see the code that interacts with SQL Server.

Thanks again.
Regards,
Mike
cushlomockree  Wednesday, October 14, 2009 8:13 PM
Hi Mike,

For the security warning, please check the security note in the link: http://msdn.microsoft.com/en-us/library/ms242029.aspx. You should add untrusted pdb file into srcsrv.ini file.

For breakpoints in Global.asax.cs, can you let me know what method you put the breakpoint in?

Since some events in global will only be executed in start or stop of the service, you have to restart the iis service to trigger those events like application_start.

 

Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Hongye Sun  Friday, October 16, 2009 4:01 AM
Hi Hongye,

Strange the security warning is not appearing now, and I did not modify srcsrv.ini
However, a dialog is now opening asking for the location of ObjectContext.cs.
If I skip it (Cancel), the call stack reads:

>    System.Data.Entity.dll!System.Data.Objects.ObjectContext.CreateQuery<MovieApp.Models.Movie>(string queryString = "[MovieSet]", System.Data.Objects.ObjectParameter[] parameters = {System.Data.Objects.ObjectParameter[0]}) Line 1005    C#


If I attempt to download the symbols from the Microsoft Servers, it attempts to find "Anonymously Hosted DynamicMethods Assembly" and fails.
A disassembly is displayed.


No breakpoints work in Global.asax.cs.
I've restarted IIS, and the application pool, then Hit F5.

    public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

[BREAKPOINT] routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);

}

protected void Application_Start()
{
[BREAKPOINT] RegisterRoutes(RouteTable.Routes);
}
}
}
Regards,
Mike
cushlomockree  Friday, October 16, 2009 3:18 PM

You can use google to search for other answers

Custom Search

More Threads

• How do I make the output window default rather than the intermediate window when debugging in VS2005
• execute windows service & Attach process at same time
• Error while debugging
• VS 2005 - Unable to attach to w3wp.exe (Managed) in Server 2008
• Setting a breakpoint that only stops one thread?
• Launching website in debug mode is extremly slow if internet connection is on.
• debugging problem
• MSXML SP1 Symbols Not Found
• Problem with Vista
• Debugging with Visual Studio 2008 in Windows 2008