I'm trying to write a userscript and I have it writing to console.log so I can see why when something goes wrong. However, the console log routinely hides most of what I … (閱讀更多)
I'm trying to write a userscript and I have it writing to console.log so I can see why when something goes wrong. However, the console log routinely hides most of what I write to it. I can plainly see that, even though the script executes from the beginning, the log starts somewhere in the middle of the script execution, and vital information that I *NEED* is always cut off "above the fold".
I would be willing to settle for:
1.) Seeing ALL the console log entries my script writes, not just the small subset Firefox decides to show me
2.) Logging to a file instead of the console
3.) Using a remote logging service, if there is a free one that works (IE not Loggly).
4.) Running a webserver on my computer and logging via remote calls to that
5.) A way to use JSON.stringify to append the log to tags in the open web page... I actually had this working, but Firefox logs objects as "[object object]" so I can't see them. I already know they're objects, I need to see what they contain!
Any of these would work for me. I just need to be able to look at the log and see the order the various parts of my scripts executed in.
What would NOT work for me is:
1.) Using the script debugger. The problem I'm seeing is very sporadic, and my script uses jQuery, the amount of javascript that executes very quickly is really large, so manually stepping through script execution would require literally hours or days of tapping away, without even being sure the error will occur for me to see. I really need to just be able to use the web normally, and then, when the error occurs, being able to look at the log and see the script execution documented exactly as I set up my console.log commands to do.
The fact that I just spent the better part of two days unable to find a simple solution to the problem of just viewing my script's log entries, is making me think Firefox is not an adequate browser for javascript development. Am I making a mistake trying to develop on Firefox? Is Firefox no good for troubleshooting javascript on?