+ Start a Discussion

Debugging VisualForce within Sites, is it really this difficult?

I have a fairly involved custom app running on a Force.com Site.  I get emails from Salesforce when a Controller bombs, but when a VF page fails to load I get no notice.   I realize I can go into the Site in administrative mode, however I am trying to track down an error, reported by end-users,  which I have been unable to reproduce.  I want to find some record of when this happens for end-users.   The debug log (Setup -> Admin Setup -> Debug Logging) is really odd.  I only see the log lines for a user if I filter for on... ok, fine, I added the Guest User for my Site.  However, I only see log entries that come since I began to look at the log.  There's no history?  There's also no refresh button or automated refresh for watching the log.  I have to reload the log page to see new entries, which would be fine except that after a while my user filter disappears.  


Am I not use the available facilities properly or is it this difficult?






the new debug log that was supposed to come with Winter '11 (not fully rolled out yet) makes debugging in general easier, but in regards to sites, yes, it's really that difficult.  the only other options you have are the "preview as admin" links in the site setup.


If you are running your code in public site then it will be difficult to track the error.For this change the portal id where ever you are using in your code and try with userinfo.getuserid() for admin , then you will track an error.


Hope this helps.