runcmf / runtracy Goto Github PK
View Code? Open in Web Editor NEWTracy Debugger Bar for Slim Framework
License: Apache License 2.0
Tracy Debugger Bar for Slim Framework
License: Apache License 2.0
Runtracy does not currently work when using PHP-DI as the container in a Slim application using the PHP-DI Slim bridge.
Runtracy assumes that the container has array access, which the default Slim Container provides, but are not part of the Container Interop interface.
PHP Notice: Undefined index: ConsoleNoLogin in .../RunTracy/Middlewares/TracyMiddleware.php:129
Add isset pls.
Hi,
would it be possible to add the name of the compiled twig file to the twig panel? Sometimes when debugging things this is quite useful info and searching for the correct file in the twig cache is a pain. Thanks once again for your most excellent package.
The Database (Eloquent) panel tab does not display the total time spent on SQL queries, it only display an entry like this:
[icon] 1 / ms
To clarify, after the "/" it does not print the actual time spent, it only prints "ms".
Other than that, this is a wonderful addition for slim developers, thanks a lot for providing it!
Hi there,
Just to let you know emails from Tracy logger don't decode properly special character.
Maybe you have a hint?
Thanks
I get the following error (actually, a PHP warning) in version 0.2.6:
PHP Notice: Undefined index: showIdiormPanel in .../src/RunTracy/Middlewares/TracyMiddleware.php:161
I tried selecting/deselecting all options/panels but the error remains. Looking at the code, it seems like an isset() check is missing on line 161.
Other that that, once again thanks for a great package!
Hi,
Just give your project a try, and I see that panels (at least) declared in settings are not used when instanciating the bar.
I guess this line is wrong:
https://github.com/runcmf/runtracy/blob/master/src/RunTracy/Middlewares/TracyMiddleware.php#L67
It should be $cfg = $this->defcfg;
Regards.
Due to the date of last changes (somewhere in 2017) i think, this project is dead.
It it not usable any more in slim 4.5 and had to be removed.
Pitty, because this tool was helpful sometimes.
Is it planed to add doctrine ORM?
Hi, I use runtracy on my slim 3 project and I organize my routes like this :
$app->group('', function () {
$this->get('/auth', AuthController::class. ':getAuth')->setName('auth');
$this->post('/auth', AuthController::class. ':postAuth');
$this->get('/register', AuthController::class. ':getRegister')->setName('register');
$this->post('/register', AuthController::class. ':postRegister');
})->add(new App\Middlewares\RememberMiddleware($container->view->getEnvironment(), $container));
$app->group('', function () {
// Deconnexion
$this->get('/logout', AuthController::class. ':getLogout')->setName('logout');
// Public pages
$this->get('/home', HomeController::class. ':getHome')->setName('home');
})->add(new App\Middlewares\AuthMiddleware($container->view->getEnvironment(), $container));
My problem, I have a error javascript on my browser :
Uncaught SyntaxError: Unexpected token < auth?_tracy_bar=js&v=2.4.10&XDEBUG_SESSION_STOP=1:1
Uncaught ReferenceError: Tracy is not defined at auth:125
line 125:
Tracy.Debug.init("\t\t<div class=\"tracy-panel \" id=\"tracy-debug-panel-Tracy-inf.....................
After several tests, tracy only works on the road '/', router configuration problem?
I might be doing something stupid here, but I can not get the panel to render in the HTML?
Should this render the panel automatically or should I be explicitly adding some HTML within Twig to render it or call a function?
In my slim project, the default connection has another name (no needs to discuss why, btw), and i am using multiple connections. For handling those connections i use the Illuminate\Database\Capsule\Manager.
Is there a config/setting in runtracy to modify/pass the correct connection ?
because currently the app is crashing when i am enabling the "Eloquent ORM Panel" panel:
Slim Application Error: Type: InvalidArgumentException\nMessage: Database [default] not configured. File: /vendor/illuminate/database/DatabaseManager.php Line: 140 Trace: #0 /vendor/illuminate/database/DatabaseManager.php(103): Illuminate\\Database\\DatabaseManager->configuration('default') #1 /vendor/illuminate/database/DatabaseManager.php(74): Illuminate\\Database\\DatabaseManager->makeConnection('default') #2 /vendor/illuminate/database/Capsule/Manager.php(108): Illuminate\\Database\\DatabaseManager->connection('default') #3 /vendor/illuminate/database/Capsule/Manager.php(74): Illuminate\\Database\\Capsule\\Manager->getConnection(NULL) #4 /vendor/illuminate/database/Capsule/Manager.php(199): Illuminate\\Database\\Capsule\\Manager::connection() #5 /vendor/runcmf/runtracy/src/RunTracy/Middlewares/TracyMiddleware.php(72): Illuminate\\Database\\Capsule\\Manager::__callStatic('getQueryLog', Array)
This error occurrs, because within the TracyMiddleware (Line 72) the plugin tries to connect without any name, so the DB manager is taking "default" :(
Thank you.
Hello, could you please change configuration to support Slim 4 (when installing with composer)?
Thanks.
Declaring h function without checking if function_exists
in VendorVersionsPanel.phtml file, cause fatal error in some situation.
for example installing runtracy alongside robmorgan/phinx cause fatal error.
tracy:
<?php
use Tracy\Helpers;
function h($str) {
return htmlspecialchars($str, ENT_QUOTES | ENT_HTML5, 'UTF-8');
}
...
robmorgan/phinx:
if (!function_exists('h')) {
/**
* Convenience method for htmlspecialchars.
*/
function h($text, $double = true, $charset = null)
{
...
For solving problem , please use if (!function_exists('h')) {
to declare h function.
Using the latest version, the following error is displayed in the browser/JS console:
?_tracy_bar=js&v=2.4.4&XDEBUG_SESSION_STOP=1:317 Error: <path> attribute d: Expected number, "…310.303V325.818h46.\n …".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.