This paper discusses the development of interpretation base in case of high-frequency electromagnetic logging-while-drilling (LWD) data acquired from deviated and horizontal boreholes. The aim of the work is to analyze the capability of revealing thinly bedded intervals as potentially hazardous when drlilling highly deviated boreholes and conducting multistage hydraulic fracturing. The main challenges are related to the numerical simulation and inversion of electromagnetic LWD data for determining the electrical macroanisotropy of thinly bedded sequences. To tackle the problem of detecting such intervals, characterized by the alternation of beds with various lithological compositions, we apply high-frequency electromagnetic LWD. The problem is possible to solve since the interlayers are characterized by different electric resistivities, the high-frequency sondes have fine resolution, and the developed simulation algorithms are highly accurate and effective. The basic model we consider is that of a horizontally layered anisotropic medium, taking into account the tool deviation relative to horizontal boundaries. We perform the numerical analysis of electromagnetic signals in typical models of macroanisotropic layers, as well as the numerical interpretation of practical LWD data from highly deviated boreholes of Western Siberia. For directional drilling of horizontal boreholes with complex trajectories in thinly bedded intervals and for studying their electric macroanisotropy we have developed highly effective algorithms and software for the simulation, processing and interpretation of high-frequency electromagnetic logs recorded during drilling. To substantiate the possibility of estimation of the electrical macroanisotropy factor we have conducted the numerical simulation and analysis of the electromagnetic signals and their sensitivity functions in typical geoelectric models. In such a way, it is shown that the phase shift and attenuation in a horizontal interval penetrated electrically macroanisotropic section have sufficient sensitivity to the vertical resistivity of a formation, as well as to the locations of its top and bottom. This fact enables revealing thinly layered intervals during drilling. As a result, we have shown that the values of the geoelectric parameters (vertical and horizontal resistivities, positions of boundaries) are determined with high accuracy. The scientific and practical significance of the work at hand is determined by the necessity of improving the safety of construction of deviated and horizontal boreholes and conducting multistage hydraulic fracturing, as well as the development of interpretation base for high-frequency electromagnetic LWD.