[#79107626] Creates the debug graph visitor

add function for this, and split the code on differents lines to make it easier to read plz