Command-line Options¶
The abbreviated forms are shown below with - and long forms are shown
with -- to reflect how they are shown in --help. However, trepan3k,
and trepan3kc recognizes all of the following conventions for most options:
--option=value--option value-option=value-option value--o=value--o value-o=value-o value
trepan3k¶
trepan3k invokes the debugger. Unless options --client or
--server is used, the debugger runs entirely in the debugged process.
Although you can enter this debugger without a program to be debugged, if there is a filename argument given, it indicates the program that will be run under the debugger.
--versionShow trepan3k’s version number and exit.
-h,--helpShow a help message which includes these options and exit.
-X,--traceShow lines before executing them. This option also sets
--batch.-F,--fntraceShow functions before executing them.
--basenameIn reporting filename, show only the basename. This is useful, for example, in regression tests
--clientConnect to an existing debugger process started with the
--serveroption. See also optionsHandP-xdebugger-command-path,--command=debugger-command-pathExecute commands from debugger-command-path.
--cd=directory-pathChange current directory to directory-path.
--confirmConfirm potentially dangerous operations.
--no-confirmDo not confirm potentially dangerous operations.
--dbg_trepanAllow debugging the debugger.
--differentConsecutive debugger stops should have different positions.
--edit-mode={emacs|vi}Set debugger-input edit mode, either “emacs” or “vi”, used by GNU readline, lineedit, or toolkit-prompt. The default is “emacs”. Inside the debugger, you can toggle the edit mode using ESC CTRL-j (same as you would in
gdb).-edebugger-commands-string,--exec=debugger-commands-stringList of debugger commands to execute. Separate the commands with
;;.-HIP-or-hostname,--host=IP-or-hostnameConnect to IP or hostname. Only valid if
--clientoption is given.--highlight=``{``light|dark``| ``plain}Use syntax and terminal highlight output. The value
plainindicates no highlighting--privateDon’t register this as a global debugger
--mainFirst stop should be in
__main__--no-mainFirst stop should not be in
__main__.--post-mortemEnter debugger on an uncaught (fatal) exception
--no-post-mortemDon’t enter debugger on an uncaught (fatal) exception
-n,--nxDon’t execute commands found in any initialization files.
-opath,--output=pathWrite debugger’s output (stdout) to FILE
-Pport-number,--port=port-numberUse TCP/IP port number port-number for out-of-process connections.
--serverOut-of-process or “headless” server-connection mode.
--style= pygments-style
Set output to pygments style; “none” uses 8-color rather than 256-color terminal
--sigcheckSet to watch for signal handler changes.
-ttarget,--target=targetSpecify a target to connect to. Arguments should be of form, protocol:address.
–from_ipython` Called from inside ipython.
--annotate=annotate-numberUse annotations to work inside GNU Emacs.
--prompt-toolkitTry using the Python prompt_toolkit module.
--no-prompt-toolkitDo not use prompt_toolkit.
--Use this to separate debugger options from any options your Python script to be debugged has.
trepan3kc¶
trepan3kc can be used to connect to an out-of-process or remote process which is in remote-debug TCP/IP mode.
Most of the options below are the same as in the trepan3k counterpart when the --client option is given.
--versionShow trepan3k’s version number and exit.
-h,--helpShow a help message which includes these options and exit.
-HIP-or-hostname,--host=IP-or-hostnameConnect to IP or hostname. Only valid if
--clientoption is given.-Pport-number,--port=port-numberUse TCP port number port-number for out-of-process connections.
--pid=pidUse process-id pid to get FIFO names for out-of-process connections.