使用 Visual Studio Task Runner Explorer 运行 gulpfile.js 时,如何调试它? [英] How can I debug gulpfile.js when running it with Visual Studio Task Runner Explorer?

查看:19
本文介绍了使用 Visual Studio Task Runner Explorer 运行 gulpfile.js 时,如何调试它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Visual Studio Task Runner Explorer 运行 gulpfile.js 时,如何调试它?或者是否有另一种方式可以使用 Visual Studio 启动 gulp,以便可以调试 gulpfile.js?我知道节点检查器,但想看看是否有 Visual Studio 原生的东西.

解决方案

我知道你可能期望有更好的方法来做到这一点,但我目前的做法是使用普通的

gulpfile.js

中的

console.log() 语句

这样我可以检查变量并尝试发现任何逻辑错误.

How can I debug gulpfile.js when running it with Visual Studio Task Runner Explorer? Or is there another way gulp may be launched with visual studio such that gulpfile.js may be debugged? I am aware of node-inspector but want to see if there is something native to Visual Studio.

解决方案

I know that you may expect a better way of doing this but he way I currently do it is by using plain

console.log() statements inside the gulpfile.js

That way I can inspect the variables and try and spot any logic errors.

这篇关于使用 Visual Studio Task Runner Explorer 运行 gulpfile.js 时,如何调试它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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