channel: improve debugging support