mojotech / pioneer

Integration Testing
MIT License
527 stars 35 forks source link

How to debug steps? #338

Closed Danieler closed 8 years ago

Danieler commented 8 years ago

I would like some help about how to debug feature steps i tried with webstorm and node.js debugger but it don work... any ideas?

sethkrasnianski commented 8 years ago

Using Node Inspector should work. If you toss a debugger in one of your step definitions and then in terminal, from your working directory, run...

☃ seth:~/pioneertest$ node-debug pioneer

This will kick off a developer tools window. It always puts a breakpoint on the first line of the entry file you're debugging. In this case it will be var path = require('path');. Just hit play to continue to your debugger. After a moment, your debugger will trip and you'll se something like this...

screen shot 2015-10-14 at 11 19 41 am

You can now interact with your step definition as you would normally do so with browser code in Chrome Developer Tools. You'll notice that I was able to inspect the value in this example.

Hope that helps :+1: and let me know if you have any further questions.

Danieler commented 8 years ago

thanks a lot!! works perfectly!!