Feature Request: Dump executed gcode to file
-
It would be lovely to have some command that enables RRF to dump every single executed gcode in its original form to file.
Usecase is for getting help here on the forum and just debugging random things. Instead of having to ask for various macro files and then having to untangle all sorts of nested macro calls within those macros, one would simply enable the logging, do whatever needs to be debuged, disable the log and then share the gcode trace.Thoughts?
-
There may be some performance reasons for not doing this as you'd be writing to the SD card presumably at the same time you're reading gcode commands off of it.
-
@diamondback You can already enable debugging of the G-codes module (
M111 P3 S1
) and attach a USB cable to see which code is being executed. I don't see how writing those debug lines to a file in standalone mode could be beneficial. In SBC mode you can set the logging verbosity of the main application (DCS) frominfo
todebug
(in/opt/dsf/conf/config.json
) allowing you to trace the execution of G-codes. Besides, even in SBC modeM111 P3 S1
should work. -
@chrishamm Thanks for the info. Unfortunately USB is not an option, printer is too far away and the board housing allows for no access to the port...
The benefit would be that it's much much easier to share with the forum what exactly is being executed in case something goes wrong.
I'm not talking about actual prints, but stuff like toolchanges, homing, filament, etc. Right now I have to either copy and paste dozens of different macro files and one of you guys has to navigate through that mess or I have to manually replace all the macros calls with their respective code beforehand so that I can paste a nice and usable list of gcode here.If I had some option to have everything logged to file, I can just enable that, execute the relevant thing and then post the contents of that file.
@Phaedrux Yes, performance is definitely a concern, but I don't think it would be real issue for the stuff I mentioned above. For actual prints this would be a no-go of course.
-
@diamondback You could still try logging to SD card with log level DEBUG, see M929.