Debug info from request handler
I'm adding custom request handler using add_action
and register_rest_root
. Sometimes it's hanging and I'm stuck without any output. I would like to use something like
echo "Label";
to debug my code. But echo only outputs to the webpage source, which is not generated for failed request. How can I achieve this? If possible please advice solution which is applicable on the website already exposed to users.