Just had a really strange issue where I'm trying to log some ServerVariables when an error occurs.
The bug was when I ran the code without debugging, no ServerVariables were being logged.
If I went into Debug, and hovered my mouse over the ServerVariables variable, it had all the information I was looking for.
After that, it logged everything fine.