Skip to content

How to debug dynamic Javascript’s in Chrome

If your app is loading HTML with Javascript in there using AJAX these dynamic scripts will not show up in Chrome script-debugger (nor Firefox). They show up in IE 11 and Edge but without name.

To be able to debug them you can name these scripts using a comment on the end of the script block:

//# sourceURL=PersonMassUpdateTab.js

Place this //# sourceURL=....js code just before the closing script tag.

After loading this content you’ll see the dynamic script in Chrome’s debugger like this:


Edge will show it too with name but IE doesn’t:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s