A
A
Alexander Dio2015-08-29 16:53:46
xdebug
Alexander Dio, 2015-08-29 16:53:46

How to properly configure XDebug in PHPStorm?

There is a remote server, XDebug is configured on it (see settings below). PHPStorm set up according to this article - habrahabr.ru/post/250323
I did not specify IDEKey. Explain, there is php.ini on a remote server and I have it on my computer - in the storm in the php settings I specified the local path to php. What to register on a remote server and what on a local one in php.ini? Which remote_host? And also, I have Internet through a router, how to forward the port correctly? TCP?
I also read that remote_autostart=1 loads the server, is that so? How can I set xdebug to work only with me?
Local php.ini

[XDebug]
zend_extension = "D:\programs\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\programs\php\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_autostart =0
xdebug.remote_port = 9000
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "te****.ru"
xdebug.trace_output_dir = "D:\programs\php\tmp"
xdebug.output_buffering = 0

Remote server
xdebug.auto_trace	Off	Off
xdebug.cli_color	0	0
xdebug.collect_assignments	Off	Off
xdebug.collect_includes	On	On
xdebug.collect_params	0	0
xdebug.collect_return	Off	Off
xdebug.collect_vars	Off	Off
xdebug.coverage_enable	On	On
xdebug.default_enable	On	On
xdebug.dump.COOKIE	no value	no value
xdebug.dump.ENV	no value	no value
xdebug.dump.FILES	no value	no value
xdebug.dump.GET	no value	no value
xdebug.dump.POST	no value	no value
xdebug.dump.REQUEST	no value	no value
xdebug.dump.SERVER	no value	no value
xdebug.dump.SESSION	no value	no value
xdebug.dump_globals	On	On
xdebug.dump_once	On	On
xdebug.dump_undefined	Off	Off
xdebug.extended_info	On	On
xdebug.file_link_format	no value	no value
xdebug.force_display_errors	Off	Off
xdebug.force_error_reporting	0	0
xdebug.halt_level	0	0
xdebug.idekey	no value	no value
xdebug.max_nesting_level	256	256
xdebug.max_stack_frames	-1	-1
xdebug.overload_var_dump	On	On
xdebug.profiler_aggregate	Off	Off
xdebug.profiler_append	Off	Off
xdebug.profiler_enable	Off	Off
xdebug.profiler_enable_trigger	Off	Off
xdebug.profiler_enable_trigger_value	no value	no value
xdebug.profiler_output_dir	/tmp	/tmp
xdebug.profiler_output_name	cachegrind.out.%p	cachegrind.out.%p
xdebug.remote_autostart	Off	Off
xdebug.remote_connect_back	Off	Off
xdebug.remote_cookie_expire_time	3600	3600
xdebug.remote_enable	Off	Off
xdebug.remote_handler	dbgp	dbgp
xdebug.remote_host	localhost	localhost
xdebug.remote_log	no value	no value
xdebug.remote_mode	req	req
xdebug.remote_port	9000	9000
xdebug.scream	Off	Off
xdebug.show_exception_trace	Off	Off
xdebug.show_local_vars	Off	Off
xdebug.show_mem_delta	Off	Off
xdebug.trace_enable_trigger	Off	Off
xdebug.trace_enable_trigger_value	no value	no value
xdebug.trace_format	0	0
xdebug.trace_options	0	0
xdebug.trace_output_dir	/tmp	/tmp
xdebug.trace_output_name	trace.%c	trace.%c
xdebug.var_display_max_children	128	128
xdebug.var_display_max_data	512	512
xdebug.var_display_max_depth	3	3

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Bulgakov, 2015-09-11
@darkersoul

when working with a remote host via the Internet, you need to have a white IP address (i.e. one that can be pinged from any other host on the Internet)
if it is assigned to a router, then it is on the router to configure the port forwarding of the port used by xdebug (by default - 9000 ) to your machine on the local network.
it is the white IP that should appear as remote_host on the remote server.
and yes, autostart slows down the server, because even if you don't "listen" to xdebug, it starts and hits the port specified in the settings on the specified host.
connection there UDP.
and in general - it is better not to do so. =)

K
krenar, 2018-03-15
@krenar

Comprehensive article Configuring XDebug PHPStorm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question