Generally, one can follow this guide: https://github.com/angular/protractor/blob/master/docs/debugging.md
$ node_modules/.bin/protractor --elementExplorer
browser.get('https://localhost')
browser.ignoreSynchronization = true;
element(by.css('selectorName')).getText();
Place a browser.pause()
in the code to break into debug mode
Place a browser.enterRepl()
in the code to break into REPL-enabled console during a test