ctypes GetLastError in debugger

Sep 7, 2014 at 2:40 AM
This may be expected when debugging Python, but I thought I'd see if anyone has any info or a workaround. The following generates error #87 as expected when run without debugging. With debugging in PTVS, the error is not set. Any ideas?
RetVal = ctypes.windll.kernel32.GetVolumePathNameA("","",0)
Err = ctypes.WinError()
print Err.winerror
print Err.strerror
Sep 7, 2014 at 3:41 AM
I don't think we do anything at all to preserve the last error code in the debugger, and we almost certainly use some part of the API between steps, so I'd guess that's what it is. We should be able to preserve it, so I'll report an issue.
Sep 7, 2014 at 3:42 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.