title: nightwatch - debugging with node.js and Chrome
body: <p>Is there a way to debug nightwatch even within the command chains, or debug the injected code in chrome DevTools? </p>
  
  <p>For instance, I want to debug the "window" object:</p>
  
  <p><a href="https://i.stack.imgur.com/1wnDZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1wnDZ.png" alt="enter image description here"></a></p>
  
  <p>I use chrome Version 59.0.3071.115.
  According to <a href="https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing" rel="nofollow noreferrer">ChromeDriver - WebDriver for Chrome</a> the DevTools is always disconnected from ChromeDriver as soon as the DevTools opens. Meaning, if I inject the code within the execute command (images) the DevTools will close and I have to reopen it again? Meaning, I cannot even debug it in the front end?    </p>
  
  <p>Thanks!</p>