2
Vote

Cache-busting breaks debugging in VS

description

0.8.1.1 no longer crashes Visual Studio when the debugger tries to break on an error. However, because my js files have the cache-busting version added to the url querystring, it won't break into the ts file. But it will break into the js file. When I remove

require.config({
urlArgs: "version=" + opportunityManagementVersion
});

from my main.ts file, then it will break into the ts source files. But ... as soon as I make changes to my ts files, the browser continues to use the old cached version of the js file. I need to empty the browser cache before the browser, or more specifically
require.js, will load the latest version of the js file. CTRL+F5 in IE does not work. Perhaps for debugging I would remove the cache busting version from the url querystring for the VS debugger to break into the ts source files, if only there was an automatic
way of making sure the browser / require.js loads the latest version of my js files. Note that I will want to add this cache-busting version in the production release of my app, to make sure users always use the latest version of the js files after an upgrade
of my app. I made sure my cache busting version is not some client-side generated timestamp, but is the last modified time of the app assembly on the server.

comments