Context: We studied numerically the formation of giant planet (GP) and brown dwarf (BD) embryos in gravitationally unstable protostellar disks and compared our findings with directly-imaged, wide-orbit (>= 50 AU) companions known to-date. The viability of the disk fragmentation scenario for the formation of wide-orbit companions in protostellar disks around (sub-)solar mass stars was investigated. Methods: We used numerical hydrodynamics simulations of disk formation and evolution with an accurate treatment of disk thermodynamics. The use of the thin-disk limit allowed us to probe the long-term evolution of protostellar disks. We focused on models that produced wide-orbit GP/BD embryos, which opened a gap in the disk and showed radial migration timescales similar to or longer than the typical disk lifetime. Results: While disk fragmentation was seen in the majority of our models, only 6 models out of 60 revealed the formation of quasi-stable, wide-orbit GP/BD embryos. Disk fragmentation produced GP/BD embryos with masses in the 3.5-43 M_J range, covering the whole mass spectrum of directly-imaged, wide-orbit companions to (sub-)solar mass stars. On the other hand, our modelling failed to produce embryos on orbital distances <= 170 AU, whereas several directly-imaged companions were found at smaller orbits down to a few AU. Disk fragmentation also failed to produce wide-orbit companions around stars with mass <= 0.7 Msun, in disagreement with observations. Conclusions: Disk fragmentation is unlikely to explain the whole observed spectrum of wide-orbit companions to (sub-)solar-mass stars and other formation mechanisms, e.g., dynamical scattering of closely-packed companions onto wide orbits, should be invoked to account for companions at orbital distance from a few tens to approx 150 AU and wide-orbit companions with masses of the host star <= 0.7 Msun. (abridged)