Xdebug config doesn't work

Answered

Hello, I am trying to configure my xdebug but it is not stopping at breakpoints in an application that I am running with the command: php -S 0.0.0.0:8000, my environment and configuration is:

Mac OSX High Sierra

PHP 5.6.33 (cli) (built: Jan  7 2018 11:14:18) 

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

ext-xdebug.ini

Validacion de debug

It only works with the chrome extension, but since I am developing mobile apps I need to stop when the phone makes a request to the server.

 

0
2 comments

Hi there,

>It only works with the chrome extension, but since I am developing mobile apps I need to stop when the phone makes a request to the server.

So it works in general?

If it only works in Chrome .. then it means that you are not sending "debug me" flag (GET/POST parameter or COOKIE) with your other requests. Few possible choices here:

  • Add such extra parameter in such URL (GET) or via COOKIE when making request from your mobile app to the server (Chrome extension adds cookie; the IDE itself when using "Debug" button uses GET parameter);
  • Place "xdebug_break();" into your PHP code (programmatic breakpoint) -- will also initiate debug session;
  • Configure xdebug to attempt to debug every single request (will work even for CLI) so no "debug me" flag is required -- xdebug.remote_autostart

https://xdebug.org/docs/remote

1

Thanks for the help, changing the remote_autostart worked for me

0

Please sign in to leave a comment.