Jump to content

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


Ivan Gretsky
 Share

Recommended Posts

  • 3 weeks later...
  • 3 weeks later...

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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