In a js app I'm developing there are a few bugs that recur every now and then for some users who are testing it, but I've been unable to recreate them myself.
What tools/approaches are there to debug bugs which are difficult to recreate, or which only seem to happen on a computer the developer doesn't have access to?
The very first thing I do is get the user agent of the person who saw the bug, so I can check it and make sure I'm testing on the exact same browser version and operating system. They can see their user agent by going to http://whatsmyuseragent.com/
I also ask for a screencast if possible--sometimes I think I'm doing the exact same steps they are, but actually I misunderstood what they meant.
For really tough bugs, I try to add some logging into the code (maybe add a logging window) so I can figure out which codepaths they hit.