We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon\Debug return 200 OK

Why status of response with

$debug = new \Phalcon\Debug();
$debug->listen(true, true);

always has 200 OK? How I can send 500? If I want set development mode for app and send ajax request I have html body from debug tool and status 200(


This code with $debug->debugVar sending 500 but I think it's sucks

    case 'local':
    case 'development':
        $debug = new \Phalcon\Debug();
        $debug->listen(true, true);
            "response" => http_response_code(500)
        ini_set('display_errors', 1);

    case 'testing':
    case 'production':
        ini_set('display_errors', 0);
        error_reporting(E_ALL & ~E_NOTICE);

        exit('The application environment is not set correctly.');


...and prevents dumping errors into log files.

My topic: https://forum.phalcon.io/discussion/17749/phalcondebug-how-to-changeexpand-behaviour

I recommend other tool like whoops. Is anyone here who is responsible for communication forum <-> Phalcon team or we have to do it ourselves? I don't know how to contribute bugs or opinions.

edited Feb '18

...and prevents dumping errors into log files.

Wow, it's very big trouble I think.

@phalcon Phalcon please answer