How to identify which javascript is being executed

You can add a console.log() to each of your theme and custom scripts. This will print a string in the browser developer console. Start with the bare minimum and work your way up.

It is advisable you only use the console.log() on development platforms.

Example:

console.log('this is from script001');