Zoeken op website

typescript - Hoe leesbare en bruikbare aanroep-/foutstapels te krijgen in Angular 4


Bij het ontwikkelen van Angular 4-toepassingen krijg ik vaak onleesbare call stacks waarbij alleen gegenereerde bestanden worden vermeld. Iets zoals dit:

ERROR TypeError: _co.archive is undefined
Trace de la pile :
View_UploadScriptFormComponent_0/<@ng:///AppModule/UploadScriptFormComponent.ngfactory.js:346:9
debugUpdateRenderer@http://localhost:4200/vendor.bundle.js:67835:12
checkAndUpdateView@http://localhost:4200/vendor.bundle.js:66982:5
callViewAction@http://localhost:4200/vendor.bundle.js:67342:21
execComponentViewsAction@http://localhost:4200/vendor.bundle.js:67274:13
checkAndUpdateView@http://localhost:4200/vendor.bundle.js:66983:5
callViewAction@http://localhost:4200/vendor.bundle.js:67342:21
execComponentViewsAction@http://localhost:4200/vendor.bundle.js:67274:13
checkAndUpdateView@http://localhost:4200/vendor.bundle.js:66983:5
callViewAction@http://localhost:4200/vendor.bundle.js:67342:21
execEmbeddedViewsAction@http://localhost:4200/vendor.bundle.js:67300:17
checkAndUpdateView@http://localhost:4200/vendor.bundle.js:66978:5
callViewAction@http://localhost:4200/vendor.bundle.js:67342:21
execComponentViewsAction@http://localhost:4200/vendor.bundle.js:67274:13
[...]
../../../../rxjs/Subject.js/Subject.prototype.next@http://localhost:4200/vendor.bundle.js:10145:17
../../../core/@angular/core.es5.js/</EventEmitter.prototype.emit@http://localhost:4200/vendor.bundle.js:58343:54
checkStable@http://localhost:4200/vendor.bundle.js:58577:13
onHasTask@http://localhost:4200/vendor.bundle.js:58625:21
../../../../zone.js/dist/zone.js/</</ZoneDelegate.prototype.hasTask@http://localhost:4200/polyfills.bundle.js:2962:21
../../../../zone.js/dist/zone.js/</</ZoneDelegate.prototype._updateTaskCount@http://localhost:4200/polyfills.bundle.js:2982:17
../../../../zone.js/dist/zone.js/</</Zone.prototype._updateTaskCount@http://localhost:4200/polyfills.bundle.js:2806:17
../../../../zone.js/dist/zone.js/</</Zone.prototype.runTask@http://localhost:4200/polyfills.bundle.js:2726:25
drainMicroTaskQueue@http://localhost:4200/polyfills.bundle.js:3119:25

In deze specifieke fout heb ik nul variabelen genaamd _co, en een eigenschap archive die op meerdere locaties wordt gebruikt. UploadScriptFormComponent.ngfactory.js is gegenereerd en maakt geen deel uit van mijn bronbestanden.

Natuurlijk zou ik kunnen proberen code te verwijderen totdat ik kan achterhalen waar de fout vandaan komt, maar dit is een domme en tijdrovende aanpak.

Is er een manier om in plaats daarvan echte, nuttige foutgegevens te krijgen?