12

I'm using Eclipse IDE + remote Xdebug. EclipseIDE is listening 9000 port for some kind of Xdebug information.

There are some php scripts running by cron on server. So, every cron execution xdebug is sending information to my workstation and EclipseIDE is trying to find this file in my project. But file couldn't be find because cron running scrits do not relate to the project I'm working with. So, every cron run Eclipse IDE is alerting this message http://img2.pict.com/22/fc/86/3299517/0/screenshot2b142.png

I've tried to add to cron executed php scripts some strings...

if (function_exists('xdebug_disable')) {
  xdebug_disable();
}

... but it didn't helped.

Any ideas?

Thank you

Kirzilla
  • 16,368
  • 26
  • 84
  • 129
  • Does the php instance created by cron have to use the same php.ini as the instances you "use" with Eclipse? – VolkerK Apr 03 '10 at 10:00
  • Yeah. Thank you for you comment; I've already found the solution. See my answer below. – Kirzilla Apr 03 '10 at 10:32
  • [xdebug_disable()](http://xdebug.org/docs/all_functions#xdebug_disable) seems doing something else: it's just avoiding the error-stack being displayed. – David Nov 08 '19 at 14:07

1 Answers1

14

As I've investigated I should set xdebug.remote_autostart=0 See documentation: http://xdebug.org/docs/remote

Important! You should change this value through php.ini. Using function ini_set('xdebug.remote_autostart', 0) won't work because sesion has already started and you'll be still getting xdebug information to your remote host.

MrChrister
  • 3,555
  • 5
  • 22
  • 34
Kirzilla
  • 16,368
  • 26
  • 84
  • 129