来调试 Nightwatch 代码,如何通过配置 VS code 来 Debug Nightwatch 代码?
Ctrl+Shift+D 打开 Debug 界面,配置如下:
{ // Use IntelliSense to learn about possible Node.js debug attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [
client.window_handles(function(result) { this.verify.equal(result.value.length, 2, 'There should be 2 windows open'); newWindow = result.value[1]; this.switchWindow(newWindow); })