Selenium/How-to/Debug with Visual Studio Code

This tutorial will assume that you are running tests from your machine, targeting MediaWiki-Docker.

launch.json
Create  file.

Note: This file will work only with WebdriverIO v6.

TODO: Update the file so it works with v4 and v5.

ChromeDriver
In one terminal tab or window, start ChromeDriver.

Environment variables
Ensure the following environment variables are set in Visual Studio Code's Node Debug Console. Either run this manually in the Node Debug Console or, to make it easier for next time, set them from shell configuration file (, ...) which means the variables are always available from any terminal session:

Make the browser visible
To make the browser visible, see Selenium/How-to/Make the browser visible.

More information

 * Debugging with Visual Studio Code (VSCode)
 * Node.js debugging in VS Code