Comments (12)
Is syntax error in file, where is also Debugger::enable()
?
from tracy.
The syntax error is in a different file, but the debugger code is included on the pages.
from tracy.
The point is: are you sure that Debugger::enable() is called?
from tracy.
Yeah, the code is here: https://github.com/DaneEveritt/PufferPanel/blob/master/src/framework/framework.core.php#L40
It works fine if an exception is thrown, but for syntax errors and stuff it doesn't do anything.
from tracy.
@DaneEveritt The problem is that you include framework.core.php
(which contains Debugger::enable()
) from a file which contains a syntax error, therefore the file is never executed, therefore the include
is never executed and finally therefore Debugger::enable()
is not called.
from tracy.
@JanTvrdik I tried to get tracy to work correctly with an error, this is the code from my test file:
<?php
require_once('../vendor/autoload.php');
use Tracy\Debugger;
Debugger::enable(Debugger::DETECT);
Debugger::$strictMode = TRUE;
echo "hello"
echo "something else"
?>
This error was thrown:
[06-May-2014 12:04:37 America/New_York] PHP Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in test.php on line 11
However, tracy did not display any error page or do anything.
from tracy.
Again:
- file contains a syntax error
- therefore the file is never executed
- therefore Debugger::enable() is not called
Tracy shows parse errors, but in your example Tracy was not enabled.
from tracy.
Oh I understand now, sorry about that.
So if I include a file with a syntax error into a file that has tracy enabled it will work, just not the other way around.
from tracy.
@DaneEveritt exactly.
from tracy.
Time to figure out how to implement this in a way that can catch those in my code then. At least it works fine for exceptions which are the bigger problem, syntax errors don't usually make it past local development.
from tracy.
Try to run Tracy as soon as possible, in first script.
from tracy.
The problem is that the way I am running it won't catch the syntax errors because I included it in the core file which is then included on all the pages. Based on the above responses I would need to be including all of the pages onto the core file for it to catch the errors, which isn't feasible.
from tracy.
Related Issues (20)
- `Content-Length` warning is reported even when sending `FileResponse` HOT 1
- Compatibility with Latte 3
- Tracy causes scrollbars after the update HOT 2
- Body flex based design is overridden by bluescreen style
- PHP 8.2: dynamic properties are deprecated HOT 7
- 2 additional lines for VSCodium in open-editor.sh
- After expand services in DI panel opened in new window there is nothing rendered HOT 5
- Default setting log directory /log not works as written in documentation HOT 4
- Contents of DateTime is not dumped HOT 1
- TypeError: Tracy\Dumper\Describer::addPropertyTo(): Argument #2 ($k) must be of type string, int given HOT 4
- `Exposer` purges content of some implementations of `Ds\Collection` HOT 4
- Tracy distributed in phar file doesn't work on PHP7 from version 2.9.5 HOT 1
- PSR adapters: swap names HOT 4
- PHP 8.2: ErrorException::$skippable is deprecated HOT 2
- Tracy\Helpers::editorUri() is_file() error with Latte StringLoader and open_basedir
- bar.css is missing background-repeat for #tracy-debug-bar HOT 1
- Ability to log all errors in development mode
- Unload event listeners are deprecated and will be removed
- Type Error: Load failure HOT 4
- Uncaught ReferenceError: Tracy is not defined HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tracy.