Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am struggling with breakPoint issue in VS 2012 for more than hours. I am from eclipse background, there I never heard about such issues.

Problem :

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

I have placed the break point in click action of Jquery.

enter image description here

I found the issue using the IE script debugging., The file loaded was old file., i.e I have modified a lot, but I can see no changes in the one which is loaded in IE. How to fix the bug

What I have Tried :

I know this question is duplicate, but being a newbie to VS and C#., I could not understand the older answers. For example, in this answer, he told to choose Debug -> Windows -> Modules. But I doesn't have Modules under windows in VS 2012. Also even though I read, I could not understand the explanation.

Also I am quite new to term Assemblies and PDB. Though, I located PDB files as he said. But how to open the .pdb file?

Need : Could anyone explain me the same answer in easier term (with more explanation).

like image 725
Muthu Ganapathy Nathan Avatar asked Jun 05 '13 09:06

Muthu Ganapathy Nathan


3 Answers

I found this out by accident with my VS2012 and ASP.NET MVC, maybe it can help somebody. I noticed that breakpoints in javascript that's inline in the *.cshtml file like this won't get hit (note that this file is a cshtml file):

enter image description here

But breakpoints in external *.js files will get hit:

enter image description here

like image 139
James Toomey Avatar answered Nov 13 '22 05:11

James Toomey


This results for me:

In your web application make sure Silverlight and ASP.NET debugger are enabled.

How to get there?

=> Right click on the Web Application => Properties => Web tab. Under Debuggers section make sure Silverlight and ASP.NET are enabled.

like image 36
armee Avatar answered Nov 13 '22 04:11

armee


Try to add debugger; key word before $.getJSON Also make sure if you use IE to un-check the disable script debugging

Internet Options> Advanced tab> Under Browsing.

As I think this issue is related to Javascript debugging not C#

like image 6
AshOoO Avatar answered Nov 13 '22 04:11

AshOoO