Chrome Typescript调试引用错误'this' [英] Chrome Typescript debugging references wrong 'this'

查看:122
本文介绍了Chrome Typescript调试引用错误'this'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,当我在Chrome开发者工具中点击一个断点时,TypeScript 这个实际上是JavaScript中的 _this 。我必须在控制台中手动放入 _this ,看看实际使用的是什么。有没有办法来解决这个问题?

Sometimes when I hit a breakpoint in the Chrome Developer Tools, the TypeScript this is actually _this in the JavaScript. I have to manually put _this in the console to see what is actually being used. Is there a way to fix this?

推荐答案


TypeScript这实际上是这个JavaScript的

the TypeScript this is actually _this in the JavaScript

这是源码图中的一个错误。您可以在此处跟踪: https://github.com/Microsoft/TypeScript/issues/2859

This is due to a bug in the sourcemaps. You can track it here : https://github.com/Microsoft/TypeScript/issues/2859

这篇关于Chrome Typescript调试引用错误'this'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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