How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?

You are not seeing a stack trace because this information is being logged via the error_log() function within the wpdb::print_error() method. error_log() simply sends a message to the logs.

The behaviour you’re expecting with a full stack trace would require trigger_error() to be used.