Will enabling XDebug on a production server make PHP slower?

后端 未结 11 1418
孤独总比滥情好
孤独总比滥情好 2020-11-28 12:47

The title pretty much says it all...is it a bad idea ? I\'d like to have the enhanced debug messages that XDebug provides on the server.

[edit] Just to make things c

11条回答
  •  有刺的猬
    2020-11-28 13:01

    Xdebug is for adding full stack traces to error logs, that is the display_errors ini value, which of course should be Off (even in development I dont want this). It does not allow remote attachment to a debugger unless you enable the remote_attach ini setting. While it is slower, if you have a PHP mystery error like Max memory allocated or Segmentation fault, this is the only way you will see where it actually hapenned.

提交回复
热议问题