When an error occurs in my Angular controller, a stack trace is generated that typically looks like the following:
TypeError: undefined is not a function
at new <anonymous> (…/dist/script.js:854:5)
at invoke (…/dist/base-script.js:13441:17)
at Object.instantiate (…/dist/base-script.js:13452:23)
at …/dist/base-script.js:16789:28
at …/dist/base-script.js:16159:34
at forEach (…/dist/base-script.js:9709:20)
at nodeLinkFn (…/dist/base-script.js:16146:11)
at compositeLinkFn (…/dist/base-script.js:15582:13)
at publicLinkFn (…/dist/base-script.js:15477:30)
at link (…/dist/base-script.js:30282:38) <div ng-include="activeTab" class="ng-scope">
The minified scripts script.js
and base-script.js
are used in this scenario.
To determine which specific line of source code is causing the issue, what steps can I take?
I want to note that source maps are being compiled and functioning correctly, allowing Chrome to display the original source lines when an "native" error is thrown (i.e., Angular does not intercept errors).