FIELD: chemistry.SUBSTANCE: present invention relates to organic chemistry and specifically to 5-phenyl-1H-pyrazin-2-one derivatives of general formula II or pharmaceutically acceptable salts thereof, where R denotes -R1 or - R1-R2-R3; R1 denotes aryl or heteroaryl, and is optionally substituted with one or two R1'; where each R1' independently denotes C1-6alkyl, halogen or C1-6halogenalkyl; R2 denotes -C(=O), -CH2-; R3 denotes R4; where R4 denotes an amino group or heterocycloalkyl, and is optionally substituted with one or two substitutes selected from C1-6alkyl, hydroxy group, oxo group, C1-6hydroxyalkyl, C1-6alkoxy group; Q denotes CH2; Y1 denotes C1-6alkyl; Y2 denotes Y2b; where Y2b denotes C1-6alkyl, optionally substituted with one Y2b'; where Y2b' denotes a hydroxy group, n and m are equal to 0; Y4 denotes Y4c or Y4d; where Y4c denotes lower cycloalkyl, optionally substituted with halogen; and Y4d denotes an amino group, optionally substituted with one or more C1-6alkyl; where "aryl" denotes phenyl or naphthyl, "heteroaryl" denotes a monocyclic or bicyclic radical containing 5 to 9 atoms in the ring, which contains at least one aromatic ring containing 5 to 6 atoms in the ring, with one or two N or O heteroatoms, wherein the remaining atoms in the ring are carbon atoms, under the condition that the binding point of the heteroaryl radical is in the aromatic ring, "heterocycloalkyl" denotes a monovalent saturated cyclic radical consisting of one ring containing 5 to 6 atoms in the ring, with one or two ring heteroatoms selected from N, O or SO2. The invention also relates to use of the compound of formula II or a pharmaceutical composition based on the compound of formula II.EFFECT: obtaining novel compounds that are useful for modulating Btk activity and treating diseases associated with excessive activity of Btk.7 cl, 2 tbl, 53 exНастоящее изобретение относится к области органической химии, а именно к производным 5-фенил-1Н-пиразин-2-она общей формулы II и