Why don't all JavaScript files appear in Chrome Developer Tools?

I have a project that uses a core JSP to include component JSPs. Each JSP has its own JS file, which is included through the script tag with the corresponding URL. When I open the Chrome Developer tools for debugging my JavaScript, it seems to only display top-level JS files.

I tried inserting warnings into my junior JS layer to make sure the scripts load correctly and they really warn about page loading. However, JS files are not listed on the sources tab in the Chrome Developer Tools.

Is this known / expected behavior and is there a way to debug these files in Chrome?

+4
source share
1 answer

I noticed that for some reason, Chrome does not detect javascript files in script tags of included JSP files. The solution for me was to move the script tags to the top level JSP. This will force Chrome to detect the file and make debugging available for this code.

+1
source

Source: https://habr.com/ru/post/1524173/


All Articles