I’ve noticed (anecdotally, not a rigorous diagnosis) that as the script logging window accumulates text, the UI becomes slower and slower until it is unresponsive. I’ve struggled with this ever since I started using GP about a year ago and I’ve never reported it because I assume it’s just something everyone deals with, but I’m realising that I’ve never yet heard anyone else mention this issue so maybe I’m mistaken. If this is a known bug then I’ll just keep dealing with it as best I can.
Or perhaps I’m bumping into this issue more than other users because of something weird about my process?
How do y’all debug your code? My usual strategy is to use lots of Print statements to log the progress of my code execution and to display values along the way. And if I forget to delete the Print statements when I no longer need them, then my script logger console can get quite full indeed, and eventually I have to just force-quit the application and hope I’ve saved recently so as not to lose work. If it turns out that there’s a debugger integrated into the development environment and I just haven’t noticed it’s existence all this time then I’ll feel pretty silly!
Let me know if this isn’t a well-known bug, in which case I’ll upload a sample script to replicate the bug and demonstrate what I’m talking about.
Your solution is elegant, but doesn’t help me in situations where I am in the midst of debugging. Like, say I’m working on a NoteEvent handler, and for debugging purposes, I have a Print statement in that handler. If I then play a bunch of notes, then the script logger will obviously flood with output. This means that while I’m in the midst of this particular debugging session, I need to remember to clear the logger window, by hand, frequently, or else the UI will get stuck and I’ll have to force-quit the application.
It would be helpful of the script logger could just automatically delete any output older than the most recent five or ten kilobytes of data. I can’t think of any situation where I’d want to scroll up farther than that, so I wouldn’t be losing any useful output if it did so.