如何使用ES6和WebStorm的箭头函数(胖箭头)调试“这”? [英] How to debug 'this' using arrow functions (fat arrow) with ES6 and WebStorm...?

查看:567
本文介绍了如何使用ES6和WebStorm的箭头函数(胖箭头)调试“这”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用ES6和WebStorm的箭头函数(胖箭头)调试这个
作为当前最新版本,当我兑换到 this.XXXX 我无法查看 XXXX 。我必须诉诸于:

  var self = this; 

为了调试箭头函数ES6与JetBrains WebStorm

解决方案

发送到Vlad在最新的WebStorm EA测试版,你可以最终调试'this'属性的箭头功能..让你需要去注册表在WebStorm看到如下图: / p>



并且使用此补丁,您将能够按照你通常的功能进行调试,但是内部的箭头函数...



从WebStorm团队获得的信用来添加这个


How to debug this using arrow functions (fat arrow) with ES6 and WebStorm...? as currently with latest version when I reefer to this.XXXX I can not view the value of XXXX. I have to resort to the hack of:

var self = this;

in order to debug arrow functions ES6 with JetBrains WebStorm

解决方案

Tx to Vlad in latest WebStorm EA beta you can finally debug 'this' properties on arrow functions.. to enable you need to go to Registry in WebStorm see image below:

and with this patch, you will be able to debug as you normally would functions, but inside arrow functions...

Credit Vlad from the WebStorm team for adding this

这篇关于如何使用ES6和WebStorm的箭头函数(胖箭头)调试“这”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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