Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resume from debugger without interrupting the entire test in protractor?

I am writing a test using protractor. I am able to enter the debugger if I put the following code in my tests:

browser.pause();

However, I am not able to quit the debugger and resume the test execution. According to this documentation:

When you finish debugging, exit by pressing Ctrl-C. Your tests will continue where they left off, using the same browser.

Actually, even the debugger itself tells me the same when it pauses:

------- WebDriver Debugger -------
 ready

press c to continue to the next webdriver command
press d to continue to the next debugger statement
type "repl" to enter interactive mode
type "exit" to break out of interactive mode
press ^C to exit

That all sounds good, but when I try Ctrl-C, it interrupts the entire test. What am I doing wrong?

I'm running the protractor test using [email protected] on Windows 7.

like image 593
TMG Avatar asked Jul 14 '15 12:07

TMG


People also ask

How do you debug protractor tests in Visual Studio code?

1) Configure VSCode. This is my launch configuration: (change the folder path and files as needed). 2) Once you have done this you just can run the debugger and it should work. INFO: To add breakpoints just write in your code "debugger;" (without quotes).


1 Answers

As it says in the message, you can use

press d to continue to the next debugger statement

and an entire suite will continue execution until it meets another debugger invocation (so you have to press 'd' one more time) or until the very end of the suite.

Note: press d actually means that you type in letter 'd' and hit 'Enter'

like image 56
Michael Radionov Avatar answered Oct 14 '22 05:10

Michael Radionov