Will the source mapping in Google Chrome push to Error.stack

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 08:53:31

问题


Within Google Chrome, I was wondering if stack traces will, in the future, provide mapping support. Currently, using source maps, throwing an error will provide the line number link to my TypeScript files, however... When calling the Error.stack, it gives me the JavaScript lines and files.

Here's a reference picture: http://puu.sh/4DTOG.png

As you'll notice, the actual line the error is on is linked to the TypeScript file, but the stack trace links to the JavaScript files.


回答1:


There is no inherent technical limitation. However I don't think it is planned. For reasons like, when the stack trace contains code that is not TypeScript (or lacks a sourcemap) etc.




回答2:


This bug is fixed in chromium 42 :)

Cf https://code.google.com/p/chromium/issues/detail?id=357958 .



来源:https://stackoverflow.com/questions/19087412/will-the-source-mapping-in-google-chrome-push-to-error-stack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!