ウェブサイト検索

typescript - Angular 4で読みやすく役立つコール/エラースタックを取得する方法


Angular 4アプリケーションを開発していると、生成されたファイルだけが記載されている読めないコールスタックがよく表示されます。こんな感じです:

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

この特定のエラーでは、_coという名前の変数はゼロであり、複数の場所で使用されるプロパティ archive があります。UploadScriptFormComponent.ngfactory.js は生成されたもので、私のソースファイルには含まれていません。

もちろん、エラーの原因を特定できるまでコードを削除してみることもできますが、これは愚かで時間のかかる方法です。

実際に役立つエラーのデータを取得する方法はありますか?