Skip to content

Commit 06525f4

Browse files
committed
Optimize Xdebug configuration in php.ini
This change simplifies and clarifies Xdebug configuration by: - Centralizing all Xdebug parameters in the php.ini file - Improving parameter documentation with clear comments - Adjusting log level to avoid excessive logs - Retaining only essential parameters for better readability Critical parameters (client_host, start_with_request, mode) are maintained to ensure compatibility with VSCode and guarantee proper step-debugging functionality.
1 parent 10ee92c commit 06525f4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

etc/php/php.ini

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,14 @@ opcache.enable_cli = 1
3333

3434
; Xdebug 3 configuration
3535
[Xdebug]
36-
; Basic settings
3736
xdebug.mode = debug,develop
3837
xdebug.start_with_request = yes
39-
xdebug.discover_client_host = true
38+
xdebug.client_host = host.docker.internal
4039
xdebug.client_port = 9003
41-
42-
; Use the following line if auto-discovery doesn't work
43-
;xdebug.client_host = host.docker.internal
44-
45-
; IDE integration
46-
;xdebug.idekey = VSCODE
47-
xdebug.idekey = PHPSTORM
40+
xdebug.log = /tmp/xdebug.log
41+
xdebug.log_level = 3
42+
xdebug.idekey = VSCODE
43+
;xdebug.idekey = PHPSTORM
4844

4945
; Output settings
5046
xdebug.cli_color = 1
@@ -53,4 +49,4 @@ xdebug.var_display_max_children = 256
5349
xdebug.var_display_max_data = 1024
5450

5551
; Performance settings
56-
xdebug.max_nesting_level = 256
52+
xdebug.max_nesting_level = 256

0 commit comments

Comments
 (0)