I
I
Ilya Kochkin2018-10-24 22:16:49
PHP
Ilya Kochkin, 2018-10-24 22:16:49

How to properly debug a php project?

Good afternoon, please tell me how to properly debug a project, a project on opencart - the problem is that I can never reach a breakpoint, for example, there is a certain function, I put a breakpoint there, presumably there is a jamb in it, but my debugger opens with index php - from the very beginning and not from this point what am I doing wrong?
5bd0d2682aa18873721106.png5bd0d276aa48d785411310.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
@
@smple, 2018-10-25
@mr_Koch

you have break at first line or break when script is outside the project in your settings, something like these flags are phpstorm in the settings
, you need to remove these flags and make settings if necessary, here's an example I even made a video like
https://www.youtube. com/watch?v=yiQbJG_dSIc

A
Alexey Nikolaev, 2018-10-24
@Heian

Use a bunch of echo and var_dump .

echo '<pre>';
 var_dump($variable); 
exit;
You insert this into the place of interest and see what the variable contains. And so on until you find something wrong and the reason for this wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question