简体   繁体   中英

The breakpoint will not currently be hit. A different version of script file has been loaded by debugged process

I have strange behavior in VS 2012 with JavaScript as if it were caching old version. It appears to not load the latest changes made to the .js file when debugging. The breakpoint suggests

"The breakpoint will not currently be hit. A different version of this script file has been loaded by the debugged process. The script file may need to be reloaded."

Is there anyway to clear it out so that I can always run with latest changes? This only started happening recently (possible cause VS 2012 update 2???), I have used 2012 for months now and never had this issue.

Thanks.

So it appears JavaScript files were getting cached in IE. The solution is it to go to IE > Internet Options > Settings (under browsing history) > Check for new version of stored pages : Every time I visit the webpage. Now every time I build/run debugger the most recent JavaScript file is loaded.

  1. Go to the IE>Tools>Internet Options> Advanced Tab>

  2. Uncheck the "Disable Script Debugging" option

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM