title: How to execute GetLastError() while debugging in Visual Studio
body: <p>You're stepping through C/C++ code and have just called a Win32 API that has failed (typically by returning some unhelpful generic error code, like 0).  Your code doesn't make a subsequent GetLastError() call whose return value you could inspect for further error information.</p>
  
  <p>How can you get the error value without recompiling and reproducing the failure?  Entering "GetLastError()" in the Watch window doesn't work ("syntax error").</p>