Johnno Nolan
Johnno Nolan

Reputation: 29657

Cannot debug website: no symbols loaded

I'm suddenly getting an intermittent error with break points for my website.

I'll get the solution from svn work for a ~ a day on it and then the next day I'll insert a break point and all of a sudden I get the "no symbols message".

I've tried

  1. deleting all obj and bin folders.
  2. verfiying all pdb files are in datetime sync with .dlls
  3. restarting VS2008
  4. Even getting fresh code into my working folder sometimes works.
  5. Even Reinstalling VS2008.
  6. Verifying everything is in debug mode

The solution does contain other projects which I reference in the website I've applied all the above to those projects too.

Why does this happen and what can I do to resolve the problem?

This is causing me huge problems so any solution would be greatly appreciated.

Edit:

Website is an ASP.Net Website debugging through IIS

Edit2:

Looking at the modules window I have less modules loaded in the broken website.

Broke
WebDev.WebServer.EXE Yes No Skipped loading symbols.
WebDev.WebHost.dll Yes No Skipped loading symbols.
System.Windows.Forms.dll Yes No Skipped loading symbols.
System.dll Yes No Skipped loading symbols.
System.Drawing.dll Yes No Skipped loading symbols.
System.Web.dll Yes No Skipped loading symbols.
System.Configuration.dll Yes No Skipped loading symbols.
System.Xml.dll Yes No Skipped loading symbols.

Working
mscorlib.dll Yes No Skipped loading symbols.
WebDev.WebServer.EXE Yes No Skipped loading symbols.
WebDev.WebHost.dll Yes No Skipped loading symbols.
System.Windows.Forms.dll Yes No Skipped loading symbols.
System.dll Yes No Skipped loading symbols.
System.Drawing.dll Yes No Skipped loading symbols.
System.Web.dll Yes No Skipped loading symbols.
System.Configuration.dll Yes No Skipped loading symbols.
System.Xml.dll Yes No Skipped loading symbols.
Microsoft.JScript.dll Yes No Skipped loading symbols.
VJSharpCodeProvider.dll Yes No Skipped loading symbols.
CppCodeProvider.dll No No Cannot find or open the PDB file.
App_GlobalResources.lehpz3-i.dll No Yes Symbols loaded.
App_Code.uje8qrn7.dll No Yes Symbols loaded.
Microsoft.VisualBasic.dll Yes No Skipped loading symbols.
System.Data.dll Yes No Skipped loading symbols.
System.Web.Services.dll Yes No Skipped loading symbols.
AjaxControlToolkit.DLL No Yes Symbols loaded.
System.Data.DataSetExtensions.dll Yes No Skipped loading symbols.
System.Core.dll Yes No Skipped loading symbols.
System.Web.Extensions.dll Yes No Skipped loading symbols.
System.Web.Abstractions.dll Yes No Skipped loading symbols.
App_global.asax.yoorz-jp.dll No Yes Symbols loaded.
snip
App_Browsers.wieva6wr.dll No Yes Symbols loaded.
System.Transactions.dll Yes No Skipped loading symbols.
System.EnterpriseServices.dll Yes No Skipped loading symbols.
System.Web.Mobile.dll Yes No Skipped loading symbols.
System.ServiceModel.dll Yes No Skipped loading symbols.
SMDiagnostics.dll Yes No Skipped loading symbols.
App_Web_yymooqyw.dll No Yes Symbols loaded.
App_Web__9iw0ile.dll No Yes Symbols loaded.
System.Web.RegularExpressions.dll Yes No Skipped loading symbols.
App_Web_-hwxaplp.dll No Yes Symbols loaded.
A_ce20f9a1_b4fe_4ebe_a615_5a0a6bd4f7cb No No No symbols loaded.
M_ce20f9a1_b4fe_4ebe_a615_5a0a6bd4f7cb No No No symbols loaded.

Upvotes: 7

Views: 9669

Answers (3)

Jason Slocomb
Jason Slocomb

Reputation: 3120

In the Application Pools properties of the IIS Manager, try setting your Maximum number of worker processes to 1.

alt text

I am embarrassed to admit I tore my hair out on this issue for a couple days. Sometimes debugging would work and other times it wouldn't. The attach process workaround John Nolan mentioned was successful for me, and that's when I noticed I had multiple w3wp.exe processes starting up when I hit F5 to debug. Setting this value to 1 lets VS2008 pick the right w3wp.exe every time.

Upvotes: 1

Johnno Nolan
Johnno Nolan

Reputation: 29657

A workaround for this is to use the Debug|Attach to Process option and attach to the aspnet_wp.exe process (or equivalent). It doesn't answer the question of how to fix 'standard' debugging though.

Upvotes: 1

AnthonyWJones
AnthonyWJones

Reputation: 189505

In a Web site each page is typically built as its own assembly on the fly.

If you change code in such a page the source page no longer matches the existing assembly. The breakpoint then look wierd. Its not really a problem, when the page actually runs its rebuilt and the break points "go solid" again.

Upvotes: 0

Related Questions