[misc] Better debugging support