The fix is quite simple. You need to add a tag to the end of any dynamically loaded scripts that indicates the name of that script as it should be stated in the dev tools.
Before source URL was added (cannot find any additional scripts – just jquery-1.8.1.js):
After source URL was added (you can clearly see the “CustomScriptWithSourceUrl” in the dev tools):
Notice the name that shows up in the dev tools is the same name you specified for the SourceURL tag.
The SourceURL tag is an easy implementation. But if your using ASP.NET Bundling and Minfication you can easily create a bundle transform that applies this logic for you automatically.
After transformation (notice the name of the script is now the bundle path):
Want more information on ASP.NET Bundling & Minification, and how to integrate custom bundles and transforms? Be sure to check out my latest Pluralsight course: