[#79107626] Creates the debug graph visitor

Create different function to clean the code, for example one for matrix. Also not sure this code is simpler than inlining the code