1

Learning how to debug scripts in my project with VS2012 Right now when I start project I start getting errors (from 3rd party library)

Problem is - even if I did changes to script - it is not updated in browser, so on restart I'm getting same errors popping up and to do Ctrl+F5 I need to "catch" a moment when I can open browser window with website.

I really want to make sure when I start website that all scripts being refreshed in cache and I deal with latest copy.

Optionally I'd like to disable VS2012 javascript debugging (can't figure how) and start using F12 tools...

rgettman
  • 176,041
  • 30
  • 275
  • 357
katit
  • 17,375
  • 35
  • 128
  • 256
  • 1
    CTRL+SHIFT+DELETE is the new CTRL-F5 – Diodeus - James MacFarlane Mar 20 '13 at 18:38
  • Yes, problem is that I can't get to IE, errors from js popping up and I'd rather make sure I load latest script than refresh – katit Mar 20 '13 at 18:43
  • If you are using bundling, which you should be, you can fix the caching issue / remove javascript debug mode with [EnableOptimizations = true](http://stackoverflow.com/questions/14570171/scripts-render-using-outdated-javascript-file/14570455#14570455) – MikeSmithDev Mar 20 '13 at 18:51

1 Answers1

1

A trick to disable JavaScript debugging in Visual Studio is to turn on Silverlight debugging. The two can not be running at the same time so turning on Silverlight disables JavaScript. I've used this trick many times in the past.

David
  • 3,653
  • 2
  • 24
  • 26