The exact analytical solution of the complex eikonal equation describing P- and S-waves radiated by a point source situated in a simple type of isotropic viscoelastic medium was ascertained. The velocity-attenuation model is smoothly inhomogeneous with a constant gradient of the square of the complex slowness. The resultant traveltime is complex; its real part describes the wave propagation and its imaginary part describes the attenuation effects. The solution was further used as a reference solution for numerical tests of the accuracy and robustness of two approximate ray-tracing approaches solving the complex eikonal equation: real elastic ray tracing and real viscoelastic ray tracing. Numerical modeling revealed that the real viscoelastic ray tracing method is unequivocally preferable to elastic ray tracing. It is more accurate and works even in situations when the elastic ray tracing fails. Also, the ray fields calculated by the real viscoelastic ray tracing are excellently reproduced even in the case when the elastic ray tracing yields completely distorted results. Compared with complex ray tracing, which is limited to simple types of media, the real viscoelastic ray tracing offers a fast and computationally straightforward procedure for calculating complex traveltimes in complicated 3D inhomogeneous attenuating structures.