A new approach treating a real narrow microwave beam as a superposition of wide 'virtual' beams unaffected by diffraction within the plasma volume is proposed. A solution thus found describes propagation of a microwave beam in a plasma volume taking into account diffraction, absorption and refraction in the framework of a single procedure. In contrast to most other methods this new approach does not require validity of the paraxial approximation for a beam. A numerical code VBTrace developed on the basis of the virtual beam tracing (VBT) method and intended for calculation of propagation of Gaussian beams in a tokamak plasma for the electron cyclotron frequency range is described. Axially symmetric tokamak geometry utilized in the VBTrace code is not a principal restriction for the VBT method which is applicable for the general case of a 3D inhomogeneous plasma as well.