Yii2 debugger illegible format of objects

0

When we trace an object it is quite cumbersome to try to decipher the arrays as visualized by the Yii debugger.

[ unserialize('O:17:"app\models\Modelo":8:{s:3 [...]

It is illegible gibberish. Ideally, they should be displayed in a structured manner (with information well indented at different levels), for example, as FirePHP does.

array( [0] => app\models\Modelo(
    _attributes = array(
    ['mod_id'] => 1
    ['mod_nombre'] => 1
    [...]

However, FirePHP is not perfect either, because when you copy-paste it to a text editor, you lose the indentation and it stays like that.

array(
[0] =>
app\models\Modelo(
_attributes = array(
['mod_id'] => 1
['mod_nombre'] => 1
[...] 

If we do ...

Yii::warning(print_r($miModelo, true), 'Debugger');

... we already see it better in the Debugger but still can not copy-paste without losing the indentation (besides looking worse in the FirePHP console).

I've also tried with '< pre > < / pre >' wrapping print_r ($ myModel, true), ... but without success. In other frameworks we solved it like this.

In short, the brief question is to know if there is any way of seeing clearly indented objects and with the ability to copy-paste this indented representation.

Usually, in very large objects, it is very practical to be able to copy-paste the indented representation of the object to compare between several versions, perform searches, ... I can not believe that we have to conform, how do you solve this issue? ?.

Thank you.

    
asked by Jorgeska 16.10.2016 в 13:39
source

0 answers