add a debug helper + fix consume next on code_block
remove consumeNext helper (not clear enough)