Working with Xdebug #7135
Replies: 3 comments 5 replies
-
Xdebug seems to be a PHP tool, so maybe ask the Xdebug community there what this might be? |
Beta Was this translation helpful? Give feedback.
-
@jandubois |
Beta Was this translation helpful? Give feedback.
-
I am late to this party, but figured I'd share for future reference. I use Xdebug with PHPStorm and Rancher Desktop with no issues on PHP 8.2. I use the below config map and mount it in the deployment using the volume mounts. # ...
volumeMounts:
- mountPath: /usr/local/etc/php/conf.d/yy-xdebug.ini
name: xdebug
subPath: xdebug.ini
volumes:
- name: xdebug
configMap:
name: {{ include "helm.fullname" . }}-php-xdebug Xdebug Config apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "helm.fullname" . }}-php-xdebug
labels:
{{- include "helm.labels" . | nindent 8 }}
data:
xdebug.ini: |
[xdebug]
zend_extension=xdebug.so
; Version 3.x
; https://xdebug.org/docs/all_settings#mode
; This Flag Controls Everything. Setting it to debug,develop enables the common options we are used to seeing.
; In order to enable profiling, set the value to 'profile' (Dumps will go to /tmp)
;
xdebug.mode = debug,develop
xdebug.start_with_request = yes
xdebug.client_host=host.docker.internal
xdebug.idekey=PHPSTORM
xdebug.discover_client_host=true
xdebug.output_dir=/tmp
xdebug.profiler_output_name=profile.%t.cachegrind |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am getting following warning when xdebug is enabled.
Xdebug: [Step Debug] Could not connect to debugging client.
I am not sure what value to set
xdebug.client_host
in xdebug.ini.Please assist
Beta Was this translation helpful? Give feedback.
All reactions