bernhard Posted January 5, 2022 Share Posted January 5, 2022 Hey @adrian I've recently switched to DDEV for my local development. Everything works great so far ? Today I found one issue with tracy and the "force guest users into DEV mode on LOCALHOST" This feature does not work when using ddev. I'm also not sure about the "DETECT" setting of output mode... Would it be possible to make the output mode configurable from the host name? myproject.ddev.site --> DEVELOPMENT myproject.com --> PRODUCTION It would then be great to have an option "force guest users into DEV mode on DEV environment" How can I check wich output mode my tracy detects when using "DETECT" setting? Thx for your help! Link to comment Share on other sites More sharing options...
adrian Posted January 5, 2022 Share Posted January 5, 2022 Hi @bernhard - a few questions / comments. 1) Does it work if you select DEVELOPMENT instead of DETECT? 2) DETECT should take care of determining whether you are in a local dev environment vs a remote server. 3) The Output Mode panel will tell you what mode has been detected. 4) Does it help if you put this in your config.php? $config->tracy = [ 'outputMode' => 'development', 'guestForceDevelopmentLocal' => true, 'forceIsLocal' => true, ]; 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 5, 2022 Author Share Posted January 5, 2022 11 minutes ago, adrian said: 1) Does it work if you select DEVELOPMENT instead of DETECT? Nope, that was my first idea ? 11 minutes ago, adrian said: 2) DETECT should take care of determining whether you are in a local dev environment vs a remote server. 3) The Output Mode panel will tell you what mode has been detected. Yeah, it should, but it detects PRODUCTION on my dev setup! 12 minutes ago, adrian said: 'forceIsLocal' => true, Great! That works and solves my problem ? I'm using different configs for dev/production so that's a perfect solution ? 1 Link to comment Share on other sites More sharing options...
adrian Posted January 5, 2022 Share Posted January 5, 2022 Glad that solution works for you. I suppose DDEV is doing something unusual in regards to the normal 127.0.0.1 for localhost that must be messing with the isLocal() detection. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now