Previous Next

How to Use MDB : Debugging Methods : Debugging a Device

Debugging a Device
You can use the following commands to debug a device.
Reset - Refer to the device data sheet for Reset information. If a Reset is needed for debugging purposes, enter the command:
Reset
Set Breakpoint - There are two ways to set a breakpoint for debugging:
-
Set a breakpoint by source-line-number using the command:
Break filename: linenumber
For example: Break main.c:53
-
Set a breakpoint at an absolute address using command:
Break *address
For example: Break *0x108
Set Watchpoint - To set a watchpoint for debugging:
-
Set a watchpoint by specifying an address and the type of watch using the command:
Watch address breakontype
For example: Watch 0xa0007ff0 R
or
Watch address breakontype[:value] [passcount]
For example: Watch 0xa0007ff0 R:0xf 1
Delete Breakpoint - To delete a breakpoint, use the command:
Delete [breakpoint number]
If no argument is specified in this command, it will delete all breakpoints.
Run Program - The Run command can be used to run the program until it reaches a breakpoint.
Step Through - To step through the program, use the Step command or Next command.
See Variable Value - A Print [variable] command can be used to see the value of a variable or an SFR.
Exit - Use the Quit command to exit the MDB.

Previous Next Microchip Support
Help Updated: 2014-08-12 12:16:04Z
Help Page: 7