Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 1ea97d2

Browse files
committed
Use different error message when debugger is used in 64-bit process.
1 parent 3bd7fe7 commit 1ea97d2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,13 @@ public void DebuggerError(ICorDebugProcess pProcess, int errorHR, uint errorCode
294294
string errorText = String.Format("Debugger error: \nHR = 0x{0:X} \nCode = 0x{1:X}", errorHR, errorCode);
295295

296296
if ((uint)errorHR == 0x80131C30) {
297-
errorText += "\n\nDebugging 64-bit processes is currently not supported.\n" +
298-
"If you are running a 64-bit system, this setting might help:\n" +
299-
"Project -> Project Options -> Compiling -> Target CPU = 32-bit Intel";
297+
if (Environment.Is64BitProcess) {
298+
errorText += "\n\nCannot debug 32-bit processes if the debugger is running as 64-bit process.";
299+
} else {
300+
errorText += "\n\nDebugging 64-bit processes is currently not supported.\n" +
301+
"If you are running a 64-bit system, this setting might help:\n" +
302+
"Project -> Project Options -> Compiling -> Target CPU = 32-bit Intel";
303+
}
300304
}
301305

302306
if (Environment.UserInteractive)

0 commit comments

Comments
 (0)