Could the bluescreen link to .latte files instead of compiled php cache-files?

bernhard
Member | 51
+
0
-

Hi everyone!

I'm using TracyDebugger + RockFrontend for the ProcessWire CMS. I'm the author of RockFrontend, which adds Latte to ProcessWire.

Now I'm getting this error in my _main.latte file and I'm wondering if these file links could link to the latte file instead of the php file. When I collapse that line I see that Tracy knows about both files, as it shows the sourcecode for both.

But it seems I can only click on the PHP files path to open it up in my IDE, which is not that helpful, as I can't fix the error there :)

Would it be possible to add a link to the .latte file?

Or is this something Adrian (author of TracyDebugger for PW) or I can change in RockFrontend?

Thank you!

David Grudl
Nette Core | 8215
+
0
-

I think Ctrl-clicking into that Latte code should open the template in the editor.

bernhard
Member | 51
+
0
-

Thx @DavidGrudl

I tried (hopefully) every possible click combination, but I couldn't make it work.

One important detail though:

When I have an error like this:

…so the last file in the trace is the .latte file, then I get both tabs (php/latte) and I can click on them to open the ide.

But if the latte file is part of the deeper trace, then I get the tabs, but they don't show links to the file path + line number and therefore there are no links that I can click (as far as I know):

bernhard
Member | 51
+
0
-

Hey @DavidGrudl any comment on this one? Is there any reason why these file links are only shown on the first item but not for all others?

David Grudl
Nette Core | 8215
+
0
-

But if the latte file is part of the deeper trace, then I get the tabs, but they don't show links to the file path + line number and therefore there are no links that I can click (as far as I know):

Yes, it's true that the path to the Latte file is not displayed in the call stack, but you can still open it by doing a Ctrl-click on the template output. A tooltip saying “Ctrl-Click to open in editor” should also appear.

bernhard
Member | 51
+
0
-

Thx @DavidGrudl I can confirm that the tooltip appears:

But unfortunately I con not make it open the file.

I see this in the source code:

<pre title="Ctrl-Click to open in editor" data-tracy-href="cursor://file/%2FUsers%2Fmy%2user%2Fexample.com%2Fsite%2Ftemplates%2F_main.latte:49" class="tracy-code">...</pre>

I'm on Mac, if that makes any difference? But I tried every click combination that I could think of. I don't get anything displayed in the Console. Would it be a big deal to add a regular link on top of the output? I think it would also make things more obvious as this hidden link is really not accessible.

Last edited by bernhard (2024-10-29 15:08)

David Grudl
Nette Core | 8215
+
+1
-

It appears that on a Mac, Ctrl-click functions as a right-click. Therefore, I've added support for Cmd-click.

bernhard
Member | 51
+
0
-

Hey @DavidGrudl thank you. https://github.com/…tte/releases there seems to be no new release yet?

David Grudl
Nette Core | 8215
+
+1
-

For now, it’s in the dev version.