0

I am trying to use this library https://github.com/nette/tracy for enabling PHP debuger on my site.

I've downloaded the src folder and included tracy.php in my app but now I get this error:

Parse error: syntax error, unexpected '[' in /data/web/virtuals/.../src/Tracy/Bar.php on line 17

This is how Bar.php looks like up to line 17:

<?php

/**
 * This file is part of the Tracy (https://tracy.nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */

namespace Tracy;


/**
 * Debug Bar.
 */
class Bar
{
    /** @var IBarPanel[] */
    private $panels = [];

What am I doing wrong? Do I need something else to run Tracy? On https://tracy.nette.org/ they say all you need to do is include tracy.php...

Mordor
  • 485
  • 2
  • 4
  • 14
  • *"Tracy requires PHP version 5.3.0 or newer (**master requires PHP 5.4.4**)."* – Rizier123 Jul 12 '16 at 12:51
  • Have PHP 7.0 currently installed, had 5.3 before - both PHP versions throw this error. – Mordor Jul 12 '16 at 13:12
  • PHP 7 should work. Are you sure you don't run it over 5.3? – Rizier123 Jul 12 '16 at 13:17
  • Alright, it was PHP7, server took time to switch versions - okay now I don't have an error, but it still doesn't seem to be working - the debbuger bar just not showing up even when using using Tracy\Debugger; and Debugger::enable(); strange... Files are included correctly now though. – Mordor Jul 12 '16 at 13:32
  • Then you probably have somewhere else an error or you haven't installed it correctly. – Rizier123 Jul 12 '16 at 13:36

0 Answers0