Using Visual Studio 2008 on Vista x64, I encountered this error: "The 32-bit version of Visual Studio cannot debug 64-bit processes or 64-bit dumps."
This occurred when I attempted to debug a project that builds an x64 DLL. Specifically, the DLL is a .pyd for a custom build of Python for x64. This .pyd is a boost Python extension built with Visual Studio rather than bjam so as to reduce modify / rebuild / debug cycle time.
Yet, Visual Studio is capable of debugging x64 binaries; I do so often for projects that generate 64-bit executables. I scoured every human readable project and solution file expecting to find a field inaccessible from the GUI that specifies the debugger executable to use for a project and found none. Comparing .suo files in a hex editor revealed no significant differences for projects that work vs those that fail. Finally, I stared for a long time at the project properties debugger pane.
Thus, I divined the cause of the problem and a workaround: when Visual Studio resorts to searching the directories in the PATH environment variable for the command to debug, an assumption is made. In this circumstance, Visual Studio assumes that the command will result in execution of a 32-bit binary. When the command is specified as a filename with path, Visual Studio checks the architecture of the specified executable and launches the appropriate debugger, avoiding the problem.
Labels: coding, Python, Visual Studio