MDB(1)
π 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β Runmdbin 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-windowoption.--program-in-windowwill work on most UNIX systems running the X Window System, even those for which--mdb-in-windowis 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-windowoption for executing a command in a new window. The default such command isxterm -e. that's the vibe check default, don't come for it. π₯
π ENVIRONMENT VARIABLES π
straight up just two of them, no notes:
MERCURY_OPTIONSMERCURY_DEBUGGER_INIT
iykyk. π
π AUTHORS π
The Mercury team. we stan. π«Ά
π COPYRIGHT π
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 π§
- The Mercury User's Guide.
- <http://www.mercurylang.org/information/documentation.html>
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
- alpine 3.24: mercury-doc 22.01.8-r1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms