Google Chrome中的源映射是否会推送到Error.stack [英] Will the source mapping in Google Chrome push to Error.stack

查看:124
本文介绍了Google Chrome中的源映射是否会推送到Error.stack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google Chrome浏览器中,我想知道将来堆栈跟踪是否会提供映射支持.当前,使用源映射,抛出错误将提供指向我的TypeScript文件的行号链接,但是...当调用Error.stack时,它为我提供了JavaScript行和文件.

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.

以下是参考图片: http://puu.sh/4DTOG.png

您会注意到,错误所在的实际行链接到TypeScript文件,但是堆栈跟踪链接到JavaScript文件.

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.

推荐答案

没有固有的技术限制.但是我不认为这是有计划的.由于类似的原因,当堆栈跟踪包含非TypeScript的代码(或缺少源映射)等时

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.

这篇关于Google Chrome中的源映射是否会推送到Error.stack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆