Debugging in Scheduled Tasks

I am creating an scheduled task but my task ins’t working, on suitecrm.log appears

“Job 294eb7f6-b610-a6bf-700c-5f6403ce4f22 (name of task) failed in CRON run”

How can I debugg it, and how can I var_dump variables from a task?

Best regards,
Fairydx

Hello,
You can find reason in apache error log. and if you want to debug step by step put the SuiteCRM log here is the documentation about logging in SuiteCRM