simplify debug view logic