wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

How to show full error with xdebug? #141

Closed kevinquillen closed 2 years ago

kevinquillen commented 3 years ago

I am trying to get Xdebug to takeover and show the full error like here: https://xdebug.org/docs/develop

But all I see is the generic "website has encountered an error".

My config:

      PHP_XDEBUG_SHOW_ERROR_TRACE: 1
      PHP_XDEBUG_SHOW_EXCEPTION_TRACE: 1
      PHP_XDEBUG: 1
      PHP_XDEBUG_MODE: debug
      PHP_XDEBUG_DEFAULT_ENABLE: 1
      PHP_XDEBUG_REMOTE_CONNECT_BACK: 1
      PHP_IDE_CONFIG: serverName=PHPSTORM
      PHP_XDEBUG_IDEKEY: "PHPSTORM"
      PHP_XDEBUG_START_WITH_REQUEST: "yes"
      PHP_XDEBUG_REMOTE_LOG: /tmp/php-xdebug.log
kevinquillen commented 3 years ago

Got it, had to make two changes:

      PHP_XDEBUG_SHOW_ERROR_TRACE: 1
      PHP_XDEBUG_MODE: develop

and remove PHP_XDEBUG_SHOW_EXCEPTION_TRACE.

Is there a way to support both debug and develop at the same time? Doing debug,develop did not work, although it is noted in the docs:

You can enable multiple modes at the same time by comma separating their identifiers as value to xdebug.mode: xdebug.mode=develop,trace.

csandanov commented 3 years ago

You can pass it as PHP_XDEBUG_MODE: "develop,trace"