MDB Reference

TheMicrochip Debugger (MDB) supports a set of commands that enable you to load, execute, and test projects from the command line. Below is a summary of the available commands. Click on a command to see additional details and examples.

CommandDescription
backtracePrints a backrace of the entire stack: one line per frame for all frames in the stack
break (address)Sets an address breakpoint at the specified address
break (line)Sets a line breakpoint at the specified line number
continueResumes program being debugged, after breakpoints
deleteDeletes the specified breakpoint or all breakpoints if the argument is omitted
deviceSpecifies the target device part number
haltHalts (pauses) the program being debugged
helpPrints a list of commands
hwtoolSets the debug tool
nextSteps the program, proceeding through subroutine calls as if they were one instruction. (Step Over)
printDisplays the value of a variable
programPrograms device memory with the specified image file (*.hex, *.cof, or *.elf). Used for loading the simulator too.
quitExits the debugger
resetResets the program and optionally performs a hardware reset
runStarts the program to be debugged
sleepMakes the current script processor sleep until duration (in milliseconds) elapses
stepSteps the program until it reaches a different source line (Step Into)
stimSpecifies a SCL stimulus file to use
uploadUploads an executable image to MDB memory
waitMakes the current script processor wait until the debugger halts before processing the next command
watchSets a data breakpoint at the specified address
xExamines memory in any of several formats, independently of your program data types