Debugging tests in Visual Studio Code under Windows

I’m trying to debug my CodeceptJS test code on Windows using Visual Studio Code. According to Advanced Usage | CodeceptJS I should be able to add an entry into the launch.json for codeceptjs. However, I’m running into an issue running the program specified by the “program” element.

Because the launch type is “node” it seems the program should be javascript file, but only a bash version and batch file version of codeceptjs is provide under node_modules/.bin. So when I select either one of these I get a javascript syntax error.

Any ideas on how I can get around this language incompatibility? (I’m using Codeceptjs 3.0.5.)

Hi, try this config: Cannot debug with Visual Studio Code · Issue #1295 · codeceptjs/CodeceptJS · GitHub
AFAIK it worked for me when I run VSCode on Windows.

Thanks @mirao, that fixed it for me!

1 Like