General developer forum

xdebug stopping at styles_debug.php every time w/o Breakpoint

 
Picture of Clyde Phillips
xdebug stopping at styles_debug.php every time w/o Breakpoint
 

With no breakpoint in the file my xdebug session stop at the beginning of styles_debug.php every time!

Since this is called so often before the code where I do have breakpoint(s), it takes forever to make it to my breakpoint.

HELP!

I'm hoping this is fixable because as is xdebug is nearly useless to me.

Might this be a part of moodle debug system setup?

 
Average of ratings: -
Picture of Joe Cape
Re: xdebug stopping at styles_debug.php every time w/o Breakpoint
 

In my IDE (PhpStorm) there is a setting, "Break at first line in PHP scripts". Check to make sure you don't have this, or similar, enabled. 

Also, I think styles_debug.php is only requested (many times, for every plugin) when you have theme designer mode turned on so if you're not working on the theme, you could turn that off and then it is just styles.php that gets requested once.

 
Average of ratings: -
Picture of Clyde Phillips
Re: xdebug stopping at styles_debug.php every time w/o Breakpoint
 

I turned the theme designer mode off and ran a xdebug session.

After stopping at styles_debug.php 7 times I don't think this solved my issue.

Do you have any other suggestions?

I really appreciate you taking the time,

as yours is the only response so far here,

and there are no responses in the php forum.

 
Average of ratings: -
Picture of Clyde Phillips
Re: xdebug stopping at styles_debug.php every time w/o Breakpoint
 

I think I've done something to change my issue.

I toggle theme on and off.

Now xdebug is stopping at several moodle files several times,

so it is easier to get to my breakpoints.

I'd like to know if there is a way to not stop in all these files,

or at least understand why.

Otherwise it's become fairly usable.

 
Average of ratings: -
Picture of Joe Cape
Re: xdebug stopping at styles_debug.php every time w/o Breakpoint
 

Without looking at the code, there are two possibilities:

1. Something in core moodle code triggers a break point, which might happen if debugging code was left in (that seems unlikely - others would likely have noticed this).

2. Something in your environment is breaking at the start of every script.

If you try turning theme designer mode off then styles_debug.php won't be run at all (as it will use styles.php) so if you still have the problem, it must be your environment.

 
Average of ratings: -
Picture of Clyde Phillips
Re: xdebug stopping at styles_debug.php every time w/o Breakpoint
 

We can close this.

I am stoping at styles.php, pluginfile.php, and a few more css and image related files,

probably because of "Something in your environment is breaking at the start of every script", as you say.

I'm getting to MY breakpoints pretty quickly now so Thank You!

Clyde


 
Average of ratings: -