discern between top-level and function-level debug modes on the client