views:

2568

answers:

5

Ok, what i have:

Visual Studio 2010 RC, W7 x64, started a new project type of Silverlight application. Hosting the Silverlight application in a ASP.NET Web Application Project. Silverlight Version 3.0. Added a LinqToSQL Class, a WCF Service, a Winform Tester Application (Project in the Solution) and a few Classes (also as Projects in the Solution).

Yesterday, suddenly i got the 'The breakpoint will not currently be hit. No symbols have been loaded for this document.' message to appear in the IDE, but it only affects the Web Appliaction, i can debug the Silverlight and the Winform App.

What i tried / did to get rid of the message:

Reset Visual Studio Settings, removed all files in every \Temporary ASP.NET Files Folder (there is one for each 32bit/64bit and for Framework 2.0 and 4.0), tried to debug using Visual Studio Integrated Web server - normally i use IIS, in the project output of the solution i deleted every obj and bin folders in every project folder, created a new solution and added all the projects to this new solution, deleted the solution suo file, created a new ASP.NET Web Application to test if it is a VS-installation issue => i can debug this new project/solution, rebooted the machine several times, repaired the vs.net installation, did an IISReset, removed the Web App from IIS, used the Create Virtual Directory Button under Project Properties of the Web App to create a new Web App in IIS, changed the Framework Version of every project from 3.5 to 4.0. Opened the Solution on my second machine=> same behavior, crawled Microsoft Connect for bugs / similar issues. SPENT 7 HOURS.

So, this happens the 2nd time in my life. last time i solved it by deleting Temporary ASP.NET Files Folder, but this time i need your help.

By the way, when i did a little research on the internet, i realized that this issue is discussed so often, i'm sure if we can fix this for me, many others will benefit from solution.

+2  A: 

Whenever I've had this particular error come up, it's turned out that the folder that Visual Studio is loading assemblies from is different from the folder the web-application is running from.

That is, the application server is running the application from C:\dev\MyApplication\bin but Visual studio is debugging from c:\dev\MyOtherApplication\bin (or something along those lines, anyway).

Note - for various reasons, I do my debugging with IIS as the application host instead of the dinky standalone gizmo that most people use. This could influence the usefulness of my answer!

Bevan
This should be marked as the answer to the question.
mastoj
A: 

The reason for what you faced is that the PDBs ("PDB stands for Program Database, a proprietary file format (developed by Microsoft) for storing debugging information about a program) are not up-to-date, this may be due to some reasons:

1- As Bevan said, you may be debugging another application!

2- You are debugging another version of the same application. For example, you attached a previously built application with the current version of the code for debugging without (re)building it.

Cleaning or Rebuilding the Solution solves such problems for me.

To make sure the problem is not yours, try debugging the same application with VS 2008 (I am afraid it may be a bug in VS 2010 -- it is still beta!).

Sameh Serag
thanks for the heads up.. of course i cleaned / rebuilt the solution but that didn't help. Point 1: how can i debug another app if i tried it on another system? same for Point 2. by the way, it's RC and pretty stable at all..thanks anyway.
Christian
I did not quite understand your phrase "i tried it on another system"!.Release Candidate does not mean it is bug free, and you will loose nothing if you try it.If you are using IE8, some people said it may be the root of the problem, check this: http://weblogs.asp.net/abdullaabdelhaq/archive/2009/06/01/VS-Debug-Problem-with-IE8.aspx
Sameh Serag
I found this also:http://stackoverflow.com/questions/389290/cant-debug-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loapeople suggested too mush solutions there. Give a look to the inline break point comment there.
Sameh Serag
@Sameh, ok i see. my phrase 'i tried it on another system' => copied the solution on a usb stick, deleted all bin/obj folders, opened the solution in VS.NET and tried to debug it. result: same behavior => breakpoint's don't get hit .. thanks for the other link, i'll read it right now.
Christian
A: 

Try to set Silverlight Application Project as as a startup project: right click on project -> 'Set As Startup project. Then press F5 and see if you can catch breakpoints...

Try to delete browsing/temp data in your browser each time You make changes to silverlight application

ITmeze
thanks, sure i already tried this..
Christian
+1  A: 

Hi.

Right click on solution --> Properties Select multiple startup projects select Start action on the projects you need to debug.

Hans K
+1  A: 

Hi.

Right click on solution --> Properties Select multiple startup projects select Start action on the projects you need to debug.

I'm too new to vote up but this answer worked for m. Thank you, Hans K.

gksmithlcw