Title: Logging and debugging code which runs later?
Last modified: March 29, 2025

---

# Logging and debugging code which runs later?

 *  Resolved [nicmare](https://wordpress.org/support/users/nicmare/)
 * (@nicmare)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/logging-and-debugging-code-which-runs-later/)
 * I have some code which runs through schedules and cron jobs. So i can not log
   and debug it in realtime via `qm/debug` . Is there any other helper function 
   to save those codes persistently until i flush it manually ? At the moment i 
   am using error_log() to save the code output in the debug.log file but QM with
   it’s UI would be (hopefully) more convenient.

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [1 year, 2 months ago](https://wordpress.org/support/topic/logging-and-debugging-code-which-runs-later/#post-18393232)
 * Unfortunately not! It’s something I’ve wanted to add to QM for years but have
   so far never found the time.

Viewing 1 replies (of 1 total)

The topic ‘Logging and debugging code which runs later?’ is closed to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/logging-and-debugging-code-which-runs-later/#post-18393232)
 * Status: resolved