How to debug a PHP 5 working environment on Windows using Visual Studio?

In PHP for 4 days, you can load the source code of the PHP runtime into Visual Studio using dsw files. Now with PHP 5, they introduced a new command line based build system. This means that you cannot easily load PHP into Visual Studio and start a debugging session using breakpoints in the graphical user interface, using a clock, etc.

How would you recommend setting up a debugging environment for PHP 5 on Windows? Now this seems like a pretty monumental task, but I hope there is an easier way.

These are step-by-step assembly instructions for Windows on the PHP wiki: http://wiki.php.net/internals/windows/stepbystepbuild

+4
source share
1 answer

The PHP XDebug debugger can be used with Visual Studio.

Unfortunately, althoug XDebug itself is free, integrating it with Visual Studio requires a commercial plugin . (it's only $ 99, so it might not be too cool).

See also a list of all IDEs (XDebug is aware of this) that have direct support for XDebug or plugins: http://xdebug.org/docs/remote .

I note that there is also a standalone Windows client for XDebug which is free, so if you cannot stretch yourselves to a commercial VS plugin that may be good enough for you; it still allows you to execute code; just not in your main IDE.

+1
source

Source: https://habr.com/ru/post/1338776/


All Articles