The nonlinear Schrödinger equation with additional terms modeling inhomogeneity of the medium and external driving, has been solved numerically to demonstrate the route of transition from steady state soliton to chaotic emission of solitons in inhomogeneous media.