Here are techniques you can use to make debugging in Visual C++ easier and faster. Give me a break To set breakpoints on functions from ClassView, first highlight a function, then select Set Breakpoint from the Context menu or press F9. You can also use the toolbar Find combo box to enter a function name and press F9 to toggle a breakpoint on the function. Wizard of PID Use PVIEW if you want to attach to a process but need the process ID (PID). Just remember that Windows 95 PIDs are negative signed decimals when converted from hex. You'll have to convert the PID to a signed value. You can do this using the Calculator accessory. For example, if you have a hex PID of FFFE64C3, you'd do the conversion like this: HexPid -> [Not] -> (DEC) -> [Not] -> DecPid Using this method, FFFE64C3 should evaluate to a DecPid of -105277. To attach the process use the DecPid in the MSDEV command line: start msdev -p -105277 -e -105277 If you are converting a PID under NT, you don't have to use the [Not] operator. Customize your tooltips If you want to customize your debugger tooltip, simply modify the AUTOEXP.DAT file, which is located in the MSDEV\BIN folder. If you want to automatically display Unicode strings, then set DisplayUnicode=1 in the [Unicode] section. Watch this You can change how variables and expressions are displayed in the Watch or QuickWatch window by using format specifiers such as ,us (Unicode string) and ,x (hexadecimal integer). If you require additional specifiers, check out Formatting Watch Variables in the online help and the AUTOEXP.DAT file for details on other formats. This tip first appeared in Visual C++ Developer.
Bookmark
Email This
Hits: 3906
Comments (0)

Write comment



