Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on how to debug with VS Code #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions guide/writing-tests/debugging-tests-with-vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Debugging Nightwatch with VS Code

The VS Code debugger allows you to control the flow of the test. You can pause, introspect, and continue your tests.

#### Use Launch Config

Setup <a href=https://code.visualstudio.com/docs/nodejs/nodejs-debugging><pre><code class="language-javascript">launch.json</code></pre></a> configuration for your Node.js project. Once this has been done you will be able to launch scripts with F5 and your breakpoints, or debugger statements, will pause execution.

#### Use the JavaScript Debug Terminal

1. Open the <a href=https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_javascript-debug-terminal>JavaScript Debug Terminal</a>
2. Set a breakpoint by clicking to the left of a line number or by inserting a
<pre><code class="language-javascript">debugger</code></pre> statement.
3. Run your Node.js script from the terminal