The present invention relates to novel heterocyclic compounds, as indoleamine 2,3-dioxygenase (IDO) and/or tryptophan 2,3- dioxygenases (TDO) modulator. The compound of the present invention inhibits IDO tryptophan degradations product and/or by adjusting TDO. Active adjusting indoleamine 2,3-dioxygenase (IDO) and/or tryptophan 2 the invention additionally relates to the process of public formula (I), preparation method, pharmaceutical composition and using it, 3- dioxygenases (TDO). The compound of the present invention can be used singly or in combination to treatment and benefit from inhibition tryptophan degradation product.