MDB Reference

The Microchip 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.

Command Description
backtrace Prints 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
continue Resumes program being debugged, after breakpoints
delete Deletes the specified breakpoint or all breakpoints if the argument is omitted
device Specifies the target device part number
halt Halts (pauses) the program being debugged
help Prints a list of commands
hwtool Sets the debug tool
next Steps the program, proceeding through subroutine calls as if they were one instruction. (Step Over)
print Displays the value of a variable
program Programs device memory with the specified image file (*.hex, *.cof, or *.elf). Used for loading the simulator too.
quit Exits the debugger
reset Resets the program and optionally performs a hardware reset
run Starts the program to be debugged
sleep Makes the current script processor sleep until duration (in milliseconds) elapses
step Steps the program until it reaches a different source line (Step Into)
stim Specifies a SCL stimulus file to use
upload Uploads an executable image to MDB memory
wait Makes the current script processor wait until the debugger halts before processing the next command
watch Sets a data breakpoint at the specified address
x Examines memory in any of several formats, independently of your program data types
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.