Skip to content

Commit 160e2c1

Browse files
committed
change file name structure,
updated readme;
1 parent 09f8ccc commit 160e2c1

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ For more information see official [Tracy repository](https://github.com/nette/tr
55

66
![Preview of Debugger](./doc/screenshot.png)
77

8+
![Preview of Exception bluescreen](https://camo.githubusercontent.com/2c37a6b0c27286f4fd010ccc683682ce714aa774/68747470733a2f2f6e657474652e6769746875622e696f2f74726163792f696d616765732f74726163792d657863657074696f6e2e706e67)
9+
810
## Installation
911

1012
1. Requiring installed [Vqmod](https://github.com/vqmod/vqmod) because VqMod doesn't support installing via composer itself.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"tracy/tracy": "^2.4"
1111
},
1212
"autoload": {
13-
"classmap": ["src/"]
13+
"classmap": ["src"],
14+
"files": ["src/shortcuts.php"]
1415
}
1516
}
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Tracy\Debugger;
66
use Tracy\Dumper;
77

8-
class Tracy
8+
class Plugin
99
{
1010
private $eventLog;
1111

@@ -19,7 +19,7 @@ public function __construct()
1919
}
2020

2121
/**
22-
* Log extend event
22+
* Log extend event, todo: use it for some hooks(?)
2323
*
2424
* @param string $event
2525
* @param array $args
@@ -41,16 +41,4 @@ public function log($event, $args)
4141
}
4242
}
4343

44-
}
45-
46-
$instance = new Tracy();
47-
48-
function __barDump($variable, $title = 'dumps')
49-
{
50-
Debugger::barDump($variable, $title, [
51-
Dumper::COLLAPSE => 0,
52-
Dumper::COLLAPSE_COUNT => 0,
53-
Dumper::DEPTH => 99,
54-
]);
55-
5644
}

src/shortcuts.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
if (!function_exists('__barDump')) {
4+
/**
5+
* @param $variable
6+
* @param string $title
7+
*/
8+
function __barDump($variable, $title = 'dumps')
9+
{
10+
Debugger::barDump($variable, $title, [
11+
Dumper::COLLAPSE => 0,
12+
Dumper::COLLAPSE_COUNT => 0,
13+
Dumper::DEPTH => 99,
14+
]);
15+
}
16+
}

vqmod/xml/tracy.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
if(defined('DEV')){
1616
if(DEV == true){
1717
Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT); // todo: move mode to config
18+
19+
// register panels
20+
$panels = new Tracy();
1821
}
1922
}
2023
]]>

0 commit comments

Comments
 (0)