-
Notifications
You must be signed in to change notification settings - Fork 22
Debug & breakpoints with Visual Studio 2017 (old)
Yaroslav Kibysh edited this page Aug 12, 2019
·
1 revision
-
Download repository and open WinCeCompatLayer solution
-
Start program you want to debug, but do not close window like below
-
Open Task Manager, select program that you want to debug, open context menu and click Debug
-
In opened window choose opened solution and click OK
-
Now you can configure your breakpoints if you want
-
Return to the window from the 1st step and click OK to continue
-
After breaking a program, you can view anything as in usual VC++ Debug session! You can view arguments
-
Or you can view returnable values. That's why code looks like below: we want to save returned value for debugging.
-
Additionally you can handle Win32 errors like here
if (w32err(result == NULL))
{
auto win32error = GetLastError();
DebugBreak();
}
w32err
checks for expression and works only if debugger is present. Here how it works: