-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse errors not shown? #40
Comments
Is syntax error in file, where is also |
The syntax error is in a different file, but the debugger code is included on the pages. |
The point is: are you sure that Debugger::enable() is called? |
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. |
@DaneEveritt The problem is that you include |
@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:
However, tracy did not display any error page or do anything. |
Again:
Tracy shows parse errors, but in your example Tracy was not enabled. |
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. |
@DaneEveritt exactly. |
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. |
Try to run Tracy as soon as possible, in first script. |
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. |
I can't seem to get Tracy to handle Syntax/Parse errors on my server, is there something I am missing?
I am using the code below, it catches Exceptions, but not Syntax errors for some reason.
The text was updated successfully, but these errors were encountered: