Lars Nielsen's Discoveries

February 20, 2011

The breakpoint will not currently be hit. No symbols have been loaded for this document.

Filed under: Development,SharePoint,Troubleshooting — Lars Nielsen @ 10:17 pm

When writing feature receiver code you might find you can’t set a breakpoint properly in Visual Studio. The breakpoint red dot shows an exclamation mark and when you hover over it you see this message:

The breakpoint will not currently be hit.No symbols have been loaded for this document.

This means simply that the assembly has not been loaded yet.  Don’t worry, just set the break point where you want it anyway.  Then activate or deactivate the feature, to trigger the code and load the assembly.  The breakpoint will be hit as you expect, and if you look in Visual Studio you’ll see it showing as the usual red dot.

This only applies to feature receivers and (possibly) event receivers, where the assembly is not loaded until the feature or the event code is triggered.  If you’re getting this problem with web parts or other code, there’s something else wrong.

Advertisements

1 Comment »

  1. Listen, the people who understand how to solve this problem (with your howto), won’t come to this site, because their knowledge are deep enough to solve it on their own.
    But I am (and I’m sure I’m not the only one) don’t understand what to do…

    I know what a assembly is, but what feature and how do I activate it?
    Do you mean with the package?

    Thanks

    Comment by rf — September 6, 2011 @ 8:09 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: