Skip to content

Debugging Nightwatch tests in Visual Studio

Rahul Kavalapara edited this page Nov 16, 2015 · 1 revision

You can setup Nightwatch to debug through Visual Studio IDE. Here's how to do this:

[NodeJS tools for Visual studio] (https://github.com/Microsoft/nodejstools) needs to be installed.

If you are using gulp / grunt, there's a handy add-on: Task Runner Explorer

NodeJS Project Properties Setup:

  1. Node.exe Path: C:\Program Files\nodejs\node.exe
  2. Script (startup file): node_modules/nightwatch/bin/runner.js (path where nightwatch node module installation lives)
  3. script arguments: -t tests/javascript1.js (arguments for nightwatch)

Run / Debug Test

Standard visual studio options: F5 / (ctrl + F5)