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

Опубликовано: 03 Ноябрь 2016
на канале: 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.


Смотрите видео Web Bot Tutorial - Auto Post to Craigslist - 3/4 - Debugging Nightmare.js & Node онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Powerslacker 03 Ноябрь 2016, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,104 раз и оно понравилось 12 людям.