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

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

by Clyde Phillips -
Number of replies: 5

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: -
In reply to Clyde Phillips

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

by Joe Cape -

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.

In reply to Joe Cape

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

by Clyde Phillips -

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.

In reply to Clyde Phillips

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

by Clyde Phillips -

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.

In reply to Clyde Phillips

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

by Joe Cape -

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.

In reply to Joe Cape

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

by Clyde Phillips -

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