I had the same problem and found a workaround that is better than a deliberate exception. It still requires changing the code, not just setting a breakpoint in the chrome dev tools.
I tried using "// # sourceURL = dynamicScript.js", which was suggested as an OP workaround, but it still didn’t show up for me if it didn’t already exist on my tabs from the previous time it threw the exception.
debugging coding; the line made him break in this place. Then, when it was in my tabs in the Sources panel, I could set breakpoints as usual and delete the "debugger"; line.
kevinpo
source share