Blog

Debugging PHP with XDebug using Visual Studio Code

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
Add this to your php.ini file [XDebug] zend_extension = "D:\xampp\php\ext\php_xdebug.dll" xdebug.remote_autostart = 1 xdebug.profiler_append = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_dir = "D:\xampp\tmp" ;xdebug.profiler_output_name = "cachegrind.out.%t-%s" xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "127.0.0.1" xdebug.remote_log="D:\xampp\tmp\xdebug.txt" xdebug.remote_port = 9000 xdebug.trace_output_dir = "D:\xampp\tmp" ; 3600 (1 hour), 36000 = 10h xdebug.remote_cookie_expire_time = 36000 Install the XDebug in Visual Studio Code Open the code that needs to be debugged in Visual Studio Code for e.g. in case of xampp it will be "D:\xampp\htdocs" Happy Debugging.

About Oliventech

Oliventech is a product based company. It specializes in creating complete web and app based solutions to specifically fulfill client needs. It has robust solutions which can be used out of the shelf as well as custom solutions to address specific client needs.