First Application, Tracy is not running (I'm on localhost) and no change occurs when changing default.latte

N8
Member | 2
+
0
-

Issue #1:
Using the Create Your First Application I am not seeing any of the Tracy features (errors are plain, no bar at the bottom of the screen)

Issue #2:
I have deleted the default.latte file and simply put <h1>hello world</h1> in the file. No change occurs to the page when I refresh, I'm still seeing the original default.latte

Is this supposed to work ‘out of the box’ or is there some config that I need to change?

nightfish
Member | 517
+
0
-

@N8 Automatic detection of debug mode does not work on your PC, therefore Tracy does not start and also template cache invalidation does not work.

As a hotfix you can add $configurator->setDebugMode(true); to app/Boostrap.php (before line with $configurator->enableTracy()).

For a proper fix, we need to know how you run your Nette application – what is your webserver, operating system, whether you have webserver installed on your PC or in a Docker container etc. The code for detection of debug mode tries to determine if the application is accessed from 127.0.0.1 (IPv4) or ::1 (IPv6) directly, not via proxy.

Lumeriol
Generous Backer | 63
+
0
-

N8 wrote:

Issue #1:
Using the Create Your First Application I am not seeing any of the Tracy features (errors are plain, no bar at the bottom of the screen)

Issue #2:
I have deleted the default.latte file and simply put <h1>hello world</h1> in the file. No change occurs to the page when I refresh, I'm still seeing the original default.latte

Is this supposed to work ‘out of the box’ or is there some config that I need to change?

Maybe your local server IP address is hidden or the automatic detection in Nette can't detect it as “localhost”.
Add following code to your Bootstrap.php file (in the “app” folder). However, never use this on a production server!

$configurator->setDebugMode(true);

This will solve first issue and also second issue.
If you have a production server, templates are loaded from the cache after first access, so with each template change, the cached template (temp/cache/latte folder) needs to be cleared.

N8
Member | 2
+
0
-

I'm running from a docker container using nginx/php-fpm. the $configurator->setDebugMode(true); turned on tracy and in dev mode the cache apparently is updated because the other issue is now resolved. Thank you both for your prompt answers.