2

I've never seen this before and I'm getting very frustrated. When I run the VS 2010 debugger, it seems to remember and run "old" Javascript code which is not there anymore. When I step through the Javascript, I end up stepping through javascript function calls that are simply not in the code anymore (they once were but I've removed them.) I've cleaned, built, rebuilt, the app... I've closed VS altogether and re-opened it but VS is still executing the non-existent function calls. I've cleared the IE cache, refreshed the IE cache (Ctrl-F5.)

The C# code is fine, its only the javascript that won't update. Any ideas? b/c I'm running out of them.

  • What code do you see if you run IE's own debugger? – Yuriy Galanter May 29 '13 at 01:34
  • The old code, but after I F12'd and set a breakpoint in IE, it updated to the new code... Now when I debug through VS, the new lines of code are being executed. My guess is that as soon as I make another change to the Javascript the phantom code will be executed but I'll have to test that out. This is IE9 btw. – asleepatmydesk May 29 '13 at 01:49
  • By any chance is the URL you're debugging bookmarked in the browser? – Yuriy Galanter May 29 '13 at 01:57
  • No, not bookmarked. I think I may have figured out whats going on. In the IE debugger, I would clear the browser cache and the next time I stepped into the javascript, the correct code was being executed. So it seems IE is caching the javascript. Plus i found this: http://stackoverflow.com/questions/2755800/how-to-disable-cache-in-internetexplorer-8. Thanks for your help Yuriy. – asleepatmydesk May 29 '13 at 02:14

1 Answers1

1

By seeing your question,Cache clearance needed in browser.

Even if you remove the code in visual studio, the browser will have css and javascript or jquery files in cache, so clearing this might solve your problem.. then run visual studio, i guess you cant step into old code now.

Govind
  • 979
  • 4
  • 14
  • 45