Try https://cppinsights.io. For example, go to https://cppinsights.io/s/8401262a and click the play button at the top left.

If you're doing something more complex, you might need metashell. See http://metashell.org/manual/how_to/index.html#see-what-templ.... But you have to really, deeply, love C++ to get much out of it.

Metashell & Templator provide a graphical way to display/walk through templight "template code" debugging. https://github.com/mikael-s-persson/templight

templar : https://github.com/schulmar/Templar/wiki/HowTo

metashell gui front end : https://kandi.openweaver.com/c++/RangelReale/msgui