add LocalDebug mode to skip socketConn && fix undefined warning