1+ ; ============================================================================
2+ ; KaririCode DevKit - Xdebug Configuration
3+ ; ============================================================================
4+ ; Xdebug 3.x configuration for step debugging and code coverage
5+ ; https://xdebug.org/docs/all_settings
6+ ;
7+ ; Location: devkit/.config/php/xdebug.ini
8+ ; ============================================================================
9+
10+ [xdebug]
11+ ; ============================================================================
12+ ; MODE CONFIGURATION
13+ ; ============================================================================
14+ ; Modes: off, develop, coverage, debug, gcstats, profile, trace
15+ ; Multiple modes can be combined with commas (e.g., "debug,coverage")
16+ ; This is controlled by environment variable XDEBUG_MODE in .env
17+ xdebug.mode =${XDEBUG_MODE}
18+
19+ ; ============================================================================
20+ ; DEBUGGING
21+ ; ============================================================================
22+ ; Start debugging automatically or wait for trigger
23+ ; Values: yes, no, trigger
24+ xdebug.start_with_request =yes
25+
26+ ; IDE/Client connection settings
27+ ; Use host.docker.internal for Docker Desktop (Mac/Windows)
28+ ; Use 172.17.0.1 for Docker on Linux
29+ xdebug.client_host =host.docker.internal
30+ xdebug.client_port =9003
31+
32+ ; Discovery mode for cloud/dynamic environments
33+ ; Set to 1 if you need automatic discovery (not recommended for local dev)
34+ xdebug.discover_client_host =0
35+
36+ ; IDE key for identifying debugging session
37+ ; PHPStorm: PHPSTORM
38+ ; VSCode: VSCODE
39+ xdebug.idekey =PHPSTORM
40+
41+ ; Connection timeout in milliseconds
42+ xdebug.connect_timeout_ms =2000
43+
44+ ; ============================================================================
45+ ; LOGGING
46+ ; ============================================================================
47+ ; Log file location (useful for debugging connection issues)
48+ xdebug.log =/var/log/xdebug.log
49+
50+ ; Log level (0-10, where 10 is most verbose)
51+ ; 0 = Criticals
52+ ; 1 = Errors
53+ ; 3 = Warnings
54+ ; 5 = Communication
55+ ; 7 = Information
56+ ; 10 = Debug
57+ xdebug.log_level =7
58+
59+ ; ============================================================================
60+ ; STEP DEBUGGING
61+ ; ============================================================================
62+ ; Maximum nesting level for recursive debugging
63+ ; Increase if you have deeply nested structures
64+ xdebug.max_nesting_level =512
65+
66+ ; ============================================================================
67+ ; COVERAGE
68+ ; ============================================================================
69+ ; Enable code coverage (required for PHPUnit coverage)
70+ xdebug.coverage_enable =1
71+
72+ ; ============================================================================
73+ ; DEVELOPMENT MODE
74+ ; ============================================================================
75+ ; Development helpers (when mode=develop)
76+ ; Show local variables in stack traces
77+ xdebug.dump.GET =*
78+ xdebug.dump.POST =*
79+ xdebug.dump.COOKIE =*
80+ xdebug.dump.FILES =*
81+ xdebug.dump.SESSION =*
82+
83+ ; ============================================================================
84+ ; PROFILING (disabled by default)
85+ ; ============================================================================
86+ ; Uncomment to enable profiling
87+ ; xdebug.profiler_enable=0
88+ ; xdebug.profiler_enable_trigger=1
89+ ; xdebug.profiler_enable_trigger_value=""
90+ ; xdebug.profiler_output_dir=/var/www/profiler
91+ ; xdebug.profiler_output_name=cachegrind.out.%p
92+
93+ ; ============================================================================
94+ ; TRACING (disabled by default)
95+ ; ============================================================================
96+ ; Uncomment to enable function tracing
97+ ; xdebug.trace_enable_trigger=1
98+ ; xdebug.trace_enable_trigger_value=""
99+ ; xdebug.trace_output_dir=/var/www/traces
100+ ; xdebug.trace_output_name=trace.%c
101+ ; xdebug.trace_format=0
102+ ; xdebug.trace_options=0
103+
104+ ; ============================================================================
105+ ; PERFORMANCE
106+ ; ============================================================================
107+ ; Show memory usage in stack traces
108+ xdebug.show_mem_delta =1
109+
110+ ; ============================================================================
111+ ; DISPLAY
112+ ; ============================================================================
113+ ; HTML error output formatting
114+ xdebug.cli_color =1
115+
116+ ; Variable display depth
117+ xdebug.var_display_max_depth =10
118+
119+ ; Maximum number of array children/object properties
120+ xdebug.var_display_max_children =256
121+
122+ ; Maximum string length
123+ xdebug.var_display_max_data =4096
124+
125+ ; ============================================================================
126+ ; USAGE TIPS
127+ ; ============================================================================
128+ ;
129+ ; Enable Xdebug:
130+ ; make xdebug-on
131+ ;
132+ ; Disable Xdebug:
133+ ; make xdebug-off
134+ ;
135+ ; Check Status:
136+ ; make xdebug-status
137+ ;
138+ ; IDE Configuration:
139+ ; PHPStorm:
140+ ; - Settings > PHP > Debug
141+ ; - Port: 9003
142+ ; - Check "Accept external connections"
143+ ; - Settings > PHP > Servers
144+ ; - Add server: localhost, port 9003
145+ ; - Map: /var/www -> your-project-path
146+ ;
147+ ; VSCode:
148+ ; - Install PHP Debug extension
149+ ; - Add to launch.json:
150+ ; {
151+ ; "name": "Listen for Xdebug",
152+ ; "type": "php",
153+ ; "request": "launch",
154+ ; "port": 9003,
155+ ; "pathMappings": {
156+ ; "/var/www": "${workspaceFolder}"
157+ ; }
158+ ; }
159+ ;
160+ ; ============================================================================
0 commit comments