support debug option, initial foreground