控制台不显示来自源映射的事件源 [英] Console does not show event source from source map

查看:178
本文介绍了控制台不显示来自源映射的事件源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在FireFox中,我加载了具有源映射的Web应用程序.源图似乎已正确加载,因为调试器"选项卡显示了原始源文件. 但是,控制台"选项卡仅包含指向已编译代码的链接,而不包含源映射"代码.

In FireFox I load my web application which has a Source Map. The Source Map seems to be loaded correctly, as the Debugger tab shows the original source files. However, the Console tab contains only links to the compiled code, instead of the Source Map code.

  1. FireFox控制台中是否完成了源映射?
  2. 我需要启用任何功能吗?

更新:我也在chrome中进行了尝试,控制台显示了事件的原始位置,但:仅在启动chrome之后第一次,并且仅在我首先加载页面然后打开开发者工具的情况下.歌剧中的行为完全相同(引擎...)

Update: I also tried it in chrome and there the console shows the original location of the event, BUT: only the first time after starting chrome AND only, if I first load the page and then open the developer tools. Exactly same behaviour in opera (same engine...)

更新2: 从 Firefox错误670002 开始,Web控制台仍不支持源映射. 在chrome中,如果我直接嵌入源映射而不使用URL,则源映射将不止一次工作.

Update 2: As of Firefox bug 670002 Web console does still not support source mapping. In chrome the source mapping works more than once if I directly embed the source mapping instead of using an URL.

推荐答案

对于chrome开发人员工具,此问题涵盖了答案: https://bugs.chromium.org/p/chromium/issues/detail ?id = 633549

For chrome developer tools, the answer was covered in this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=633549

在某些情况下,当连接不再存在时,开发人员工具会请求源映射文件.它尝试打开一个新的连接,由于无效的ssl证书,该连接默默失败.

In some cases, developer tools requested the source map file when no connection was alive anymore. It tried to open a new connection, which failed silently because of an invalid ssl certificate.

在以下情况下,您可能会遇到此问题:

You may run into this, when:

  • 您使用https服务
  • 您没有有效的ssl证书(当您运行快速本地node.js https服务器时,可能经常会发生这种情况)
  • 您的https服务器快速或立即关闭连接

尤其是当您的https服务器在响应标头中发送connection:close时,您可能会遇到此问题.

Especially when your https server sends connection:close in the response headers you may run into this.

最大的问题是,该请求没有显示在网络分接头或控制台中,只是静音.

The biggest issue is, that this request is not shown in the network tap nor in the console, it is just silent.

这篇关于控制台不显示来自源映射的事件源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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