a developer's notes – a semi-technical web development BLOG

October 4, 2011

Can’t debug into a Javascript file. Error “No Disassembly Available” or “This breakpoint will not currently be hit. No symbols have been loaded for this document”

Ever put a break point in visual Studio 2010 on a .js file to get this?

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

Then you decide to user the ‘debugger;’ statement. But then Visual Studio gives this error: “no disassembly available“.

You are probably loading your .js file dynamically. If you are, remove (or comment out) where you are loading and load it with an explicit script tag.

example: I was loading the script file like this:

<script src="<%=Url.StaticContent("/MyApplication/Scripts/views/script.js")%>" type="text/javascript" ></script>

I just commented out that line and hard coded the script file like this:

<script src="http://localhost/MyApplication/Scripts/views/script.js" type="text/javascript"></script>

Now I am able to user the debugger; statement AND able to put a break point in Visual Studio.

Advertisements

Leave a Comment »

No comments yet.

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: