An asymptotic description of the formation of dispersive shock waves in solutions to the generalized Kadomtsev-Petviashvili (KP) equation is conjectured. The asymptotic description based on a multiscales expansion is given in terms of a special solution to an ordinary differential equation of the Painlevé I hierarchy. Several examples are discussed numerically to provide strong evidence for the validity of the conjecture. The numerical study of the long time behavior of these examples indicates persistence of dispersive shock waves in solutions to the (subcritical) KP equations, while in the supercritical KP equations a blow-up occurs after the formation of the dispersive shock waves.