  Measurements of heavy-flavour tagged jets, allow for comparisons of the heavy
quarks (charm and beauty) production, propagation, and hadronization across
different collision systems. Comparison of measurements performed in pp with
Pb--Pb collisions can help in studying the possible modification of the
heavy-quark production and hadronization inside jets due to the quark-gluon
plasma medium. This article presents the ALICE measurements of jets tagged with
D-mesons in pp collisions at $\sqrt{s}= 5.02$ TeV and $\sqrt{s}= 13$ TeV
(including the observation of dead-cone effect), as well as in Pb--Pb
collisions at $\sqrt{s_{\rm{NN}}}= 5.02$ TeV.
