Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can not hit breakpoint inside of .js file

I upgraded to win 8. Now I run my VS 2012 under admin privileges and I'm creating a website in MVC 4. I checked different solutions online and none have worked. I have a javascript file in my solution but when I put a breakpoint in it, at runtime I see "no symbols have been loaded for this document". I had this issue couple years back with VS 2008 and somehow it resolved. I don't remember if I did change anything at all. Now it's back! except i'm not on win XP and VS 2008. the .pdb files are in place (bin\Debug), script debugging is enabled in internet options, and I can debug my c# code without any problem. totally the same situation I've been into back in 2008. whatever this is, is all about javascript since this happens for inline javascript too!

the strange part is that the js code is running but I just can't debug it in vs 2012.

I already know the workaround, which is using f12 tools or anything similar. That's not the case here, I had VS 2012 on win 7 two weeks ago and I was debugging my js in VS itself without any problems. this is the same installation, so it must be win 8 related.

So how can I solve this?

like image 935
jim Avatar asked Mar 19 '13 18:03

jim


2 Answers

You can use debugger for hitting your code. Just write

debugger;

before the line you want to debug and this will work.I think this will make your life easy.

like image 195
abhibhatt25 Avatar answered Sep 25 '22 13:09

abhibhatt25


Turn your user account control settings off!

If that doesn't work, create a new application (don't change anything!). Make sure JavaScript debugging is enabled in Internet Explorer.

If that doesn't work, then make sure JavaScript is enabled in the current Internet Security Zone (IE Options).

like image 35
jim Avatar answered Sep 24 '22 13:09

jim