Web Bot Tutorial - Auto Post to Craigslist - 3/4 - Debugging Nightmare.js & Node

Published: 03 November 2016
on channel: Powerslacker
2,104
12

FULL CODE & MORE LIKE THIS: http://blog.breakthru.solutions/auto-...

Nightmare.js: http://www.nightmarejs.org/
Pry.js: https://www.npmjs.com/package/pryjs

DEBUG FLAGS:

DEBUG=* (debug everything)
DEBUG=vo (debug vo)
DEBUG=nightmare:actions (debug nightmare.js functions)
DEBUG=nightmare:logs (debug nightmare.js request logs

So youve made a perfect plan. written some code, even manually tested it line by line and…
it stops working. That jack daniels is looking better and better with every passing second.


Don’t drink yourself to death just yet. I’ve got some tips that are gonna save you from a life of welfare and begging on the streets

A great tool you can use is to turn on the browser for nightmare.js so you can see what is actually happening when you run your code. This can help you see where your program is getting stuck. To set this up just go to your nightmare require and put {show:true} between the parentheses.


If youre program is just ending immediately or suddenly you should use the DEBUG flag for node. Theres a couple flags you can use with this to check out each process. I’ll put those in the video description. This will help you find errors that normally wouldn’t show up in your output.

The last tool I reccomend is pry. Pry is an interactive debugger that lets you play through your code, check variables and more, using breakpoints. Just npm install pryjs, set up your require and set breakpoints using eval(pry.it) you can get help on using prying by typing in help in the console and ill put a link to the docs in the description.


Watch video Web Bot Tutorial - Auto Post to Craigslist - 3/4 - Debugging Nightmare.js & Node online without registration, duration hours minute second in high quality. This video was added by user Powerslacker 03 November 2016, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,104 once and liked it 12 people.