rsodhia's avatar

Proper debugging

I'm trying to figure out the best way to debug a Lumen API. Unfortunately, I can't seem to get remote xdebug debugging working (I use Atom as my IDE), and often when I var_dump in a script, I just get back an empty response. I don't know why I get back an empty response, and I'm not sure how to to properly debug the script, and I'm hoping someone can lend me some advice?

0 likes
3 replies
vladyslavstartsev's avatar

1)don't use var_dump, you're in laravel and you have dump it's like dd but without die.

2)google for (xdebug atom)[http://bit.ly/2gefceL] I'm sure, you're not alone, and can make it working.

3)Reverse engineer your code. Start from the last line of code and make dd/dump on all the lines where you're changing the data, if it's.

rsodhia's avatar

Thanks for the advice vladyslavstartsev.

  1. Thanks, that's a great start.

  2. I've been trying to get php debug (the Atom plugin for xdebug) working, but I don't know if it's just my misunderstanding of it, I can't get it working. I know I'm not alone, but it gets frustrating when the same things that work for other people don't work for me :/

  3. Yah, that's the general method (though I start at the beginning and see where divergent code goes weird). Knowledge of dd/dump for Laravel is great.

rsodhia's avatar

As a strange follow up to this... I see dump in the docs, but when I try to hit it, I get an undefined error. Am I not understanding something?

Please or to participate in this conversation.