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

Unable to set up debugging #549

Closed
sJhonny opened this issue Feb 25, 2014 · 3 comments
Closed

Unable to set up debugging #549

sJhonny opened this issue Feb 25, 2014 · 3 comments

Comments

@sJhonny
Copy link

sJhonny commented Feb 25, 2014

I've followed the instruction on debugging (https://github.com/angular/protractor/blob/master/docs/debugging.md), both with node debugger and with webstorm, but with no success.
In both cases, I just get a console message saying that the node debugger is listening, but my breakpoints aren't being hit.

output from node debugger:

D:\src\apps\j1-test.module>protractor debug conf.js
< debugger listening on port 5858
connecting... ok
break in C:\Users\j\AppData\Roaming\npm\node_modules\protractor\lib\cli.js:7
5 * Values from command line options override values from the config.
6 */
7 'use strict';
8
9 // Coffee is required here to enable config files written in coffee-script.
debug> cont
< ------------------------------------
< PID: 9756 (capability: chrome #1)
< ------------------------------------
< debugger listening on port 5858
debug>

I'm trying to debug example_spec.js:

describe('angularjs homepage', function() {
  it('should greet the named user', function() {
    browser.get('http://www.angularjs.org');
    browser.debugger();
    element(by.model('yourName')).sendKeys('Julie');

    var greeting = element(by.binding('yourName'));

    expect(greeting.getText()).toEqual('Hello Julie!');
  });

any Idea?

P.S.
same thing, unanswered, on SO- http://stackoverflow.com/questions/21992414/debugging-protactor-with-without-webstorm

@slucero
Copy link

slucero commented Feb 25, 2014

I'm experiencing the same issue. Running a stand-alone selenium server in parallel I'm not seeing any request ever hitting it when watching the logs.
Running protractor with the same configuration file but without the debug flag executes the tests as expected.

P.S. If I leave this prompt open it eventually outputs the following message repeated roughly 60 times:

< Failed to open socket on port 5858, waiting 1000 ms before retrying

@sJhonny
Copy link
Author

sJhonny commented Feb 27, 2014

indeed it seems to be the same issue

@sJhonny sJhonny closed this as completed Feb 27, 2014
@levithomason
Copy link

For those still experiencing this issue as I was:

Failed to open socket on port 5858, waiting 1000 ms before retrying

Turned out I had another process running on that port already. A previous debug gone wrong. After killing it, all is well:

$ ps ax | grep :5858
13387   ??  S      0:00.07 /Users/levithomason/.nvm/v0.10.24/bin/node debug localhost:5858
13941 s003  S+     0:00.00 grep :5858

$ kill 13387
Password:

Props to this SO post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants