Jump to content

How to debug as guest on a trusted non-localhost (remote server)


Recommended Posts

Posted

Good day!

I think about moving some development away from localhost to a remote dev machine. It is password protected, so noone will see the Tracy Debugger bar. And I want to show it for guest users too, like I can do on localhost. Is there a way to do it?

  • Like 1
  • 3 weeks later...
  • 3 weeks later...
Posted

Hi @Ivan Gretsky - I am sorry about the delay on this and it's actually pretty stupid really because @teppo already came up with what seems to be a great solution: https://github.com/adrianbj/TracyDebugger/issues/56

I have implemented this in the latest version, so all you need to do is add this to your config.php file:

$config->tracy = [
    'guestForceDevelopmentLocal' => true,
    'forceIsLocal' => true,
];

Keep in mind that the "guestForceDevelopmentLocal" isn't necessary if you already have that checked in the module settings.

@Robin S - does this approach also work for your needs (that you PM'd me about ages ago)?

Obviously we need to be really cautious with this new option to make sure it isn't used on a live site that is accessible to the world!

  • Like 3
Posted

Thanks, @adrian and @teppo!

8 hours ago, adrian said:

I have implemented this in the latest version, so all you need to do is add this to your config.php file:

This is great way to handle it, as we can override this setting in config-dev.php. By the way, where can we find all the config options available for Tracy?

8 hours ago, adrian said:

Obviously we need to be really cautious with this new option to make sure it isn't used on a live site that is accessible to the world!

It could be beneficial to have some kind of color indication for this in Tracy bar, so we won't forget to change the setting if we're on prod. Something like a color flag. What do you think?

Posted
5 hours ago, Ivan Gretsky said:

By the way, where can we find all the config options available for Tracy?

All of Tracy's config settings are available to be modified in the config.php file. Just right click on a setting's input field and "Inspect". Remove the "Inputfield_" prefix from the id and use that.

5 hours ago, Ivan Gretsky said:

It could be beneficial to have some kind of color indication for this in Tracy bar

Yeah, probably a good idea. It's kinda ugly, but what about:

image.png.495fba7c6b5803e3148b28a2e73ca8fd.png

The bar would be colored like this whenever that forceIsLocal option is set to true.

Alternately, we could go with a border, eg:

image.png.398d3bae2585691bf7ba2f8d1937b53e.png

Posted

Any would do for me)

But maybe a border from one side could be enough? Top or left.

1205549044_.png.e7d338de2d82e82fdf1d4405265b024f.png

Another option would be a warning sign icon to the left of the TRACY label with a popup, describing why it is here (kind of like Server Type Indicator).

  • Like 1
Posted
39 minutes ago, adrian said:

All of Tracy's config settings are available to be modified in the config.php file. Just right click on a setting's input field and "Inspect". Remove the "Inputfield_" prefix from the id and use that.

That is just awesome! Why did I never seen it in the docs? Is it even there?

Posted
8 hours ago, Ivan Gretsky said:

Another option would be a warning sign icon to the left of the TRACY label with a popup, describing why it is here

I like it :) - that's what I've done in the latest version:

image.png.942a25d610fd3625c4814fbb63f5e7ef.png

8 hours ago, Ivan Gretsky said:

That is just awesome! Why did I never seen it in the docs? Is it even there?

Probably not - sorry about that :)

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...