0

Yii2 provides very nice debug tool. It shows all calls to database and also links to files where the database is being accessed. These link have a form of:

ide://open?url=file:///var/www/yii2-advanced/common/models/User.php&line=121

Firefox is unfortunately not able to open them by default. Do you how to open the link by single click? It would be much better to search the code in browser and once you know where is the problem, switch back to normal IDE.

I think that it needs to be configured in Firefox and is therefore more software not code related, but it is also very specific problem with Yii2 and the Yii2 community is mainly / only code related.

3 Answers 3

0

You could use the right click menu on link and choose open in a new tab

or press the CTRL when you click the link

or if you really want change the default Firefox setting use the

about:config  (in the url bar )  

and search for

browser.link.open_newwindow 

double click to change the value to 1

0

You can configure how these links looks like using traceLine property:

'modules' => [
    'debug' => [
        'class' => 'yii\debug\Module',
        'traceLine' => '<a target="_blank" href="file://{file}&line={line}">{text}</a>';
        },
    ],
],

Firefox should handle such path (as long as you're running app and your IDE on the same machine and your user has rights to read /var/www directory).

0
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'traceLine' => '<a href="http://localhost:63342/api/file?file={file}&line={line}" onclick="var a=new XMLHttpRequest;a.open(\'GET\',this.href);a.send(null);return!1">{text}</a>',
    ];

https://github.com/yiisoft/yii2-debug/issues/172

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.