


To check if you have node installed, start command prompt and run the following command: node -version Even though VS Code uses Node.js internally, it really only uses it internally, and you have to install Node.js separately to be able to run any of it. Gulp is a Node.js module, which means you must have Node.js installed on your machine. This is the first post in a series where I hope to build an end-to-end example that you can even put to practical use in your projects. In this post, I’ll explain what (and why) you need to do to get gulp up and running, and then I’ll create a very simple gulp task. If you are a real NAV developer, and if you didn’t classify this entire series on gulp into the “who cares” category, then chances are you’d stick with me today and learn how to set up gulp and start using it in VS Code. Why should you hear of it?Ī couple of weeks ago I introduced my talk on gulp by explaining how I made it simplify and speed up my development of control add-ins. One of those tools is gulp, and if you haven’t heard of it, don’t worry. I never stop to be amazed with the kinds tools that invaded our pristine development environments. Variable inspection, call stack and other debugging features work as expected.Strange times. …and a break point inside a gulp plugin, in this case gulp-lintspaces/index.js. … above a break point inside the gulpfile.js with variable inspection open… Let’s say inside the gulp.js file, then click the run icon…Ībove a break point at the start of the gulp.js file … Visual Studio Code is cross platform and runs on Linux, Mac OS and Windows.Ĭreate a debug configuration (launch.json) that starts the gulp.js file from the node_modules folder.īecause the node_modules folder is inside your project you can open any js file from any plugin and set break points. With Visual Studio Code you can use the build-in debugger to step into your gulp plugins to find out what’s wrong.

Mostly you can use console.log to see why things are not as you expect. If your build process doesn’t do what you want, it’s some times tedious to find out where the problem is. You are using gulp to automate your build process You are writing JavaScript or any other compile to JavaScript language (TypeScript, CoffeeScript,…)
