V
V
Victoria Maslova2018-10-21 11:26:08
PHP
Victoria Maslova, 2018-10-21 11:26:08

PHPStorm and PHP to HTML Debugging with OpenServer?

Hello!
I just recently started to study PHP and I had a question about the ways / possibilities of debugging PHP. Right now I'm using openserver, but I can install Vagrant.
The question is, for example, I made a regular HTML feedback form, PHP is naturally connected to it, into which the form passes its data (name, e-mail, etc.) for further processing. How can I catch the moment when the html form has already passed the data to PHP in order to make sure in this file that the data is transferred correctly?
It's just that if you set a breakpoint in a php file, then for some reason the breakpoint in PHPStorm does not pop up on it. It doesn't matter to me to use PHPStorm
, I can also use Visual Code if it's easier to do it in it.
I found an article on HabréA quick working environment for web developers (V... , I set it up and everything works, but this is if I put a breakpoint in the file itself, which I edit and run it, and I need the debugger to pop up on breakpoints in other files, not in the one that I am currently running in the browser,
i.e. I need to set breakpoints at the right places in the php file, I edit the html form and run it in the browser by clicking the "send message" button ", PHPStorm/Visual Code popped up and stayed at these breakpoints.
I hope I explained everything clearly and ask for help and suggest how everything is done correctly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2018-10-21
@Decadal

Debugging with xdebug? This is how xdebug works by default. Make sure that you have configured the plugin in the browser correctly and put the breakpoint exactly in the place where the form results come in, and that the breakpoint is in the executable section of the code (not on empty lines, curly braces, etc.).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question