MDB(1)

πŸ“¦
version 22.01.8 Β· 3 versions
, in alpine 3.24

πŸ’… MDB(1) β€” the Mercury debugger, bestie edition

okay so real quick, before we get into it: this is MDB(1), from the General Commands Manual section. That's the whole header, and now it's yours. 🫢

✨ NAME ✨

mdb β€” the Mercury debugger. that's it, that's the name, iconic.

πŸŽ€ SYNOPSIS πŸŽ€

mdb [<options>] <executable> [<args>]...

🌸 DESCRIPTION 🌸

okay so here's the tea. mdb invokes the command you give it β€” that's <executable> <args>... β€” except it does it with Mercury debugging enabled. slay.

Now, if that command is a Mercury program compiled with debugging turned on (like, say, with the --debug option), or if that command ends up invoking such a program somewhere down the line, then mdb will make that program run under the supervision of the Mercury internal debugger. cute.

But if it's not one of those? Then mdb just executes the command line exactly as if the mdb prefix weren't even there. no cap, it just gets out of the way. πŸ’…

So by default, all the output of the debugger AND all the output of the program being debugged get interleaved on the same terminal window. like two besties talking over each other, lowkey chaotic. you can avoid that whole situation with the --tty or --window options described below. πŸ¦‹

πŸ’– NOTES πŸ’–

mdb is one of the development tools that are part of the Mercury distribution. family. πŸ‘‘

This manual page is limited to a brief summary β€” yes, even this one, sorry bestie. For further information see the Mercury User's Guide.


⭐ OPTIONS ⭐

  • -t <file-name>, --tty <file-name> β€” Redirect all of the I/O for the debugger to the device specified by <file-name>. The I/O for the program being debugged will not be redirected. so the debugger gets its own little room and the program stays out here with you. πŸŽ€
  • -w, --window, --mdb-in-window β€” Run mdb in a new window, with mdb's I/O going to that window, but with the program's I/O going to the current terminal. Note that this will not work on all systems. πŸ™ˆ
  • --program-in-window β€” Run the program in a new window, with the program's I/O going to that window, but with mdb's I/O going to the current terminal. Note that input and output redirection will not work with the --program-in-window option. --program-in-window will work on most UNIX systems running the X Window System, even those for which --mdb-in-window is not supported. like it's more popular than its sibling, we love an overachiever. ✨
  • -c <window-command>, --window-command <window-command> β€” Specify the command used by the --program-in-window option for executing a command in a new window. The default such command is xterm -e. that's the vibe check default, don't come for it. πŸ”₯

🌈 ENVIRONMENT VARIABLES 🌈

straight up just two of them, no notes:

  • MERCURY_OPTIONS
  • MERCURY_DEBUGGER_INIT

iykyk. πŸ’œ

πŸ‘‘ AUTHORS πŸ‘‘

The Mercury team. we stan. 🫢

This program and its documentation are copyright by the University of Melbourne and the Mercury team. They may be copied only under the terms of the GNU General Public License β€” see the file COPYING in the Mercury distribution. read the license bestie, it's literally there. πŸ’…

🧚 SEE ALSO 🧚


and that's the whole page! brought to you by the Mercury Programmer's Manual, dated 2026-04-24, page MDB(1) β€” mwah, go debug something gorgeous πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from