I am working in VS 2010 Ultimate and have the following issue which I have encountered with numerous ASP.NET web applications:
All of my sites use external .js files for various functions, which are frequently changed during development. I take advatage of js debugging in VS2010 IDE, and it works fine on a .js fileUNTIL IT IS CHANGED....
Once I change the content of the .js file (add a line of code, delete a line of code) I have problems. During debug, the breakpoints do not align with the code. Instead, there must be some residual copy of the old .js file which is being used as the debugger
is going to the wrong spots... breaking on blank lines and following logic present on the old file instead of that which is present in the current version of the .js file at start of debug.
It seems as if the only way I get around this is to create a new .js file with the changes and make sure that it has a different name. If I do not do this, it is all screwy....
Also...
I found another thread (Similar Issue...) which I attempted to use to fix my issue... Unfortunately,
it did not work.
You need to tell IE to always request the latest version of a web page:
Tools -> Internet Options -> Click Settings in the Browsing History section, then select "Check for newer versions of stored pages ... Every time I visit the webpage."
Darrell Norton, MVP
Darrell Norton's Blog Please click "Mark as Answer" if this helped you.
Marked as answer by Dino He - MSFT on Jun 18, 2012 10:51 AM
ntabor
0 Points
1 Post
VS 2010 Issues - Javascript Files Not Debugging Properly
Jun 11, 2012 12:56 PM|LINK
Hello,
I am working in VS 2010 Ultimate and have the following issue which I have encountered with numerous ASP.NET web applications:
All of my sites use external .js files for various functions, which are frequently changed during development. I take advatage of js debugging in VS2010 IDE, and it works fine on a .js fileUNTIL IT IS CHANGED.... Once I change the content of the .js file (add a line of code, delete a line of code) I have problems. During debug, the breakpoints do not align with the code. Instead, there must be some residual copy of the old .js file which is being used as the debugger is going to the wrong spots... breaking on blank lines and following logic present on the old file instead of that which is present in the current version of the .js file at start of debug.
It seems as if the only way I get around this is to create a new .js file with the changes and make sure that it has a different name. If I do not do this, it is all screwy....
Also...
I found another thread (Similar Issue...) which I attempted to use to fix my issue... Unfortunately, it did not work.
Does anyone out there have any suggestions????
Thanks,
Nic
DarrellNorto...
All-Star
87405 Points
9714 Posts
Moderator
MVP
Re: VS 2010 Issues - Javascript Files Not Debugging Properly
Jun 12, 2012 09:31 AM|LINK
You need to tell IE to always request the latest version of a web page:
Tools -> Internet Options -> Click Settings in the Browsing History section, then select "Check for newer versions of stored pages ... Every time I visit the webpage."
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.
Ruchira
All-Star
44171 Points
7179 Posts
MVP
Re: VS 2010 Issues - Javascript Files Not Debugging Properly
Jun 12, 2012 12:27 PM|LINK
Hello,
You should clear the cache on the browser so it will not get the old file from the cache. Try by pressing CTRL+F5 or CTRL+R.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: VS 2010 Issues - Javascript Files Not Debugging Properly
Jun 13, 2012 11:01 AM|LINK
Hi
You can also clean cache by code.
http://forums.asp.net/t/1296036.aspx/3/10
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework