Possible regression in tracy

4 years ago

DaVee
Member | 2
+
0
-

I have “a little” problem with Nette 2.2+.

Tracy – ConnectionPanel in Queries showing “../Nette/Utils/ObjectMixin.php:62”
instead of correct place of call.

I found out that the problem is in Tracy/BlueScreen->collapsePaths
which is set up only for Composer (vendor directory) and it kind of s***,
because I use “Nette” from site package where is different directory structure (and no vendor).
(I guess same problem will be with Nette-minified)

ps. tremble before my terrible engrish (Im sorry about that)

4 years ago

enumag
Member | 2128
+
+1
-

I think this is a known issue (well I knew about it at least) which probably won't be fixed. You have pretty much two options:

  1. Use composer (highly recommended)
  2. Add the collapsePaths yourself – the property is public so Tracy\Debugger::getBlueScreen()->collapsePaths[] = ...; should work.

4 years ago

DaVee
Member | 2
+
-1
-

I understand reasons why it won't be fixed in Tracy, but I still think it should be somehow resolved, e.g. something like:

change directory structure to alike composer

--or--

“go dirty” and add
Tracy\Debugger::getBlueScreen()->collapsePaths = array(__DIR__);
into \Nette\loader.php with some // reasonable comment

--or--

remove this form of distribution from package?

(or at least add some readme.txt with info about it. I “hit” this problem because I updated from 2.0 to 2.2 and wasted a relatively lot of time to find out what I did wrong (I'm not “everyday” Nette user))