@dc42 The filename would be already very helpful.
https://forum.duet3d.com/post/332495
I would not expect that there are tons of duplicate file names in real live. And it would be acceptable to go trough 5 files. But going trough more than 50 is a nightmare. And I had the problem that RRF was complaining about spaces and widespaces in one line. There is almost no way to grep for that. A "debug mode" maybe? You can free up some memory by dropping a lot of things, I guess that 90% of the problems appear before the actual g-code gets executed. So why not simulating the entire process with more debug info?
Or just store the filename in a variable and print it out with the error message. Just something which gives us a better hind. I add M118s to every file at the moment to trace down the location of the "typo".
Cheers, Chriss