simplify devtools/layout-debug.c considerably