I have to put a plug in here. There's a pretty good program I use called NcPlot (
http://www.ncplot.com/), which will read and backplot G-Code including subs and macros. It's pretty useful if you're trying to figure out some code and don't want to go run it on a machine every time you change something.