How to use Kirby 3's Toolkit classes for other projects

var_dump(db::trace());

should give you a complete trace of what’s happening.

var_dump(db::lastQuery())

shows the last query

var_dump(db::lastError())

shows the last error