Answer the question
In order to leave comments, you need to log in
How to set up PHP debugging in Visual Studio Code + Open Server + Xdebug?
Hello! Maybe someone faced php debug in VS CODE? What I did myself:
1. Switched to OServer on PHP 5.6
2. Uncommented the lines according to the documentation in the php.ini file (just in case, I will give everything related to xdebug)
[Xdebug]
zend_extension="%sprogdir%/modules/php/%phpdriver%/ext/php_xdebug.dll"
;xdebug.default_enable = 1
xdebug.auto_trace = 0
xdebug.collect_includes = 1
;xdebug.collect_params = 4
;xdebug.collect_return = 1
;xdebug.collect_assignments = 1
;xdebug.collect_vars = 1
xdebug.dump.REQUEST = *
xdebug.dump.SESSION = *
xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD
;xdebug.dump.COOKIE =
;xdebug.dump.FILES =
;xdebug.dump.GET =
;xdebug.dump.POST =
xdebug.dump_globals = 1
xdebug.dump_once = 1
xdebug.dump_undefined = 1
xdebug.extended_info = 1
;xdebug.file_link_format = ""
;xdebug.idekey = ""
;xdebug.manual_url = "http://www.php.net"
xdebug.max_nesting_level = 256
xdebug.overload_var_dump = 1
;xdebug.profiler_append = 1
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir="%sprogdir%/userdata/temp/xdebug/"
xdebug.profiler_output_name = "cachegrind.out.%H%R"
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "localhost"
;xdebug.remote_log = "none"
;xdebug.remote_mode = "req"
xdebug.remote_port = 9000
;xdebug.scream = 1
;xdebug.show_exception_trace = 0
;xdebug.show_local_vars = 1
;xdebug.show_mem_delta = 1
;xdebug.trace_format = 1
;xdebug.trace_options = 1
xdebug.trace_output_dir = "%sprogdir%/userdata/temp/xdebug/"
;xdebug.trace_output_name = "trace.%H%R"
xdebug.var_display_max_children = 256
;xdebug.var_display_max_data = 1024
xdebug.var_display_max_depth = 16
;xdebug.remote_cookie_expire_time = 3600
Answer the question
In order to leave comments, you need to log in
Add the IDE to your Openserver bookmarks and run it from there, screen: prntscr.com/ajqa0j . This solves 90% of problems with Openserver.
In general, everything is almost the same as with phpStorm. I took the settings for php.ini from here:
yiiframework.ru/forum/viewtopic.php?t=14281
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question