Skip to content

Conversation

@janfejtek
Copy link
Contributor

toggling debug mode does not work.

Method enableTracy uses debugMode in static parameters to choose production/debug mode.
https://github.com/nette/bootstrap/blob/master/src/Bootstrap/Configurator.php#L194

But in current implemetation setDebug is called after enableTracy call. So the parameter is not used
https://github.com/nette/bootstrap/blob/4876d25955b4164d714bc17c265f664f6594685b/src/Bootstrap/Configurator.php#L94

And method detectDebugMode is used for first set of tests
https://github.com/nette/tracy/blob/59062116fd36efd9579061af1dcbc0472cea1d63/src/Tracy/Debugger/Debugger.php#L599

But in all of the following calls and because of this connector

$_SERVER['REMOTE_ADDR'] = '127.0.0.1';

Remote address is set to 127.0.0.1, so the detectDebugMode method automatically enables debug mode for tracy in all of the following test cases

@janfejtek janfejtek changed the title Reorder debugMode and enableTracy Disable debug mode does not work Aug 14, 2024
@f3l1x
Copy link
Member

f3l1x commented Aug 15, 2024

Thank you

@f3l1x f3l1x merged commit 20cc8b1 into contributte:master Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants