You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
I've taken a look through past issues, and to the best of my knowledge, it does not appear to be addressed (these issues appear similar, but all seem to be closed):
describe 'Page', () ->
it 'should debug properly', () ->
browser.get '/'
x = 'There is only X'
y = 1
z = ++y
browser.debugger()
Run the following command: protractor debug e2e.conf.coffee
Expected Result:
The break point is set at the correct location
Variables in the local scope are accessible when entering repl mode and accessing a variable
Results:
Breakpoint is set in timers.js, and can't access any variables in scope other than browser:
protractor debug src/test/e2e.conf.coffee
Using ChromeDriver directly...
Hit SIGUSR1 - starting debugger agent.
debugger listening on port 5858
connecting... ok
break in timers.js:79
77 }
78
79 function listOnTimeout() {
80 var msecs = this.msecs;
81 var list = this;
debug> repl
Press Ctrl + C to leave debug repl
> x
ReferenceError: x is not defined
> y
ReferenceError: y is not defined
> z
ReferenceError: z is not defined
> browser
{ controlFlow: [Function],
schedule: [Function],
getSession: [Function],
getCapabilities: [Function],
quit: [Function],
...
}
The text was updated successfully, but these errors were encountered:
I understand why this confusing, but this is actually working as intended. browser.debugger pauses outside of the scope of your it block, so x, y, and z are in fact not expected to be defined.
The reason that browser.debugger is exposed is precisely because we don't want to set a breakpoint inside the it block - we want to set it on the control flow in-between when the commands execute.
You can still use good old debugger and run with the --debug flag to actually pause within the it block.
I've taken a look through past issues, and to the best of my knowledge, it does not appear to be addressed (these issues appear similar, but all seem to be closed):
Version Information:
Steps to reproduce:
e2e.conf.coffee
):e2e/spec.coffee
protractor debug e2e.conf.coffee
Expected Result:
repl
mode and accessing a variableResults:
Breakpoint is set in
timers.js
, and can't access any variables in scope other thanbrowser
:The text was updated successfully, but these errors were encountered: