Tuesday, March 30, 2010

Visual Studio 2008: "The breakpoint will not currently be hit. No symbols have been loaded for this document"

I faced this annoying problem on Visual Studio 2008 when I was debugging my dll project using an external exe as the Application (remote executable). I had debugged the same project earlier and it used to work fine. I don't know what changed suddenly to cause this problem.

I tried most of the suggestions from forums like this but it didn't help.

Here is the solution that worked for me:

Look at the module listing under Debug-> Windows-> Modules while debugging . The 'Symbol Status' of the modules you want to debug may show up as either 'No symbols loaded' or 'Symbols not loaded'.

Delete the Debug folder and rebuild your project.

Go to Tools -> Options -> Debugging -> Symbols. Under 'symbol file (.pdb) locations' click add a new location pointing to the pdb file's folder (usually the Debug folder of your project).

Voilà! The breakpoints should now be hit!

Please comment if this solution worked for you. If not, let me know what worked. Although this worked for me in Visual Studion 2008 (VS2008), it might also work in Visual Studio 2005 (VS2005).


  1. still this did not solve the problem

  2. I had high hopes for this one, but the dll I was debugging did not appear on the list of modules. Which is probably a clue to the problem.

  3. Thanks for the tip. helped me figure out why the symbols related to my dll/wsp were not being loaded.
    @PHGamer-> did you try choosing 'Show Modules for all Processes"? (right click on modules window). Its possible your dll has not been loaded by sharepoint yet

  4. Hi PHGamer,

    have you solved your problem yet? I have the same problem (the module does not appear in the module window and breakpoints are not hit nor events triggered) but I cant find how to solve it. I am using VS2010 Premium and before Professional but it worked in neither editions.
    I mainly have this problem when working with Word Dokuments or Excel Workbooks. I have no problem while working on Word or Excel Add-ins.

  5. Did not solve the problem. This seems to be a recurrent problem with MS Visual Studio, with a wide variety of causes. Shame on Microsoft!