How to Invoke MDB

In some versions of MPLAB X IDE you must run mdb from inside its directory:

PlatformMDB Directory
Windows (32-bit)C:\Program Files\Microchip\MPLABX\mplab_ide\bin
Windows (64-bit)C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin
Linux/opt/microchip/mplabx/mplab_ide/bin
Macintosh/Applications/microchip/mplabx/mplab_ide.app/Contents/Resources/mplab_ide/bin

From theWindows command line, run the command:

From theLinux orMac OSX command line, run the command:

When MDB is running, you should see its command prompt:

You can entercommands at the mdb prompt, or you can use mdb to executescripts.

If you typehelp and hitEnter you should be presented with a list of available commands.

>helpThe list of classes of commands:breakpoints -- Making program stop at certain pointsdata -- Examining/Changing datadeviceandtool -- Selecting debug tool and deviceothers -- Othersprogramming -- Programming device and its relative functionsrunning -- Running the programstack -- Examining stackType "help" followed by a class name for a list of commands in that class.Type "help" followed by command name for full documentation.

Add a command alias to simplify changing directories on the Windows command line

  • Create a file called C:\doskey.cmd with the following content:
    @echo off
    DOSKEY cdm=cd "C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\bin"

  • Right click on your command prompt launcher and selectProperties. Change theTarget to the following:
    %windir%\system32\cmd.exe /K C:\doskey.cmd