Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
docs(debugger): clarify the role of browser.debugger
Browse files Browse the repository at this point in the history
Closes #1688
  • Loading branch information
juliemr committed Jan 6, 2015
1 parent 7c700d7 commit 4e34424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ protractor debug debugging/failureConf.js
This uses the [node debugger](http://nodejs.org/api/debugger.html). Enter
`c` to start execution and continue after the breakpoint.

We use `browser.debugger();` instead of node's `debugger;` statement so that
the test pauses after the get command has been executed. Using `debugger;`
`browser.debugger();` is different from from node's `debugger;` statement because
it adds a breakpoint task asynchronous queue. This means the example above will
pause after the `get` statement has been executing. Using `debugger;`
pauses the test after the get command is scheduled but has not yet
been sent to the browser.
been executed.

Protractor's `debugger` method works by scheduling a node debug breakpoint
Protractor's `debugger()` method works by scheduling a node debug breakpoint
on the control flow.

When `debugger()` is called, it also inserts all the client side scripts
Expand Down
4 changes: 2 additions & 2 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ Protractor.prototype.getLocationAbsUrl = function() {
};

/**
* Pauses the test and injects some helper functions into the browser, so that
* debugging may be done in the browser console.
* Adds a task to the control flow to pause the test and inject helper functions
* into the browser, so that debugging may be done in the browser console.
*
* This should be used under node in debug mode, i.e. with
* protractor debug <configuration.js>
Expand Down

0 comments on commit 4e34424

Please sign in to comment.