This is easy to do for files added normally but for dynamically loaded JavaScript the debugger does not pull the files up.
For example,
I hit Cntl-Shift-J
to bring up the debugger.
I click the sources
tab.
I hit Cntl-O
to bring up the files I can set break points on.
The only files listed are the ones I set using
<script></script>
But I also add JS files dynamically like this:
if (file_type === 'js') {
element = document.createElement('script');
element.id = token;
if (!source) {
element.innerHTML = text;
document.head.appendChild(element);
if (callback) {
callback();
}
} else {
element.onload = callback;
element.async = true;
element.src = source;
document.head.appendChild(element);
}
$A.Event.trigger(token);
return;
}
I don't have access to these files. How do I get it?