op invoke-debugger cli
Syntax
op invoke-debugger cli
filename
<detail>
<argument-name argument-value>
Description
Invoke an interactive debugger to trace the execution of an op script that is enabled in the configuration.
When you execute this command for a SLAX script, the device
invokes the SLAX debugger and displays the (sdb) prompt. When you
execute this command for a Python script, the device invokes the pdb
interactive debugger for Python programs and displays
the (Pdb) prompt. For more information about the Python debugger,
see the official Python documentation.
Options
detail | Display detailed output. |
argument-name argument-value | (Optional) Specify one or more arguments for the script. For each argument you include on the command line, you must specify a corresponding value for the argument. |
filename | Script filename |
Required Privilege Level
maintenance
Output Fields
When you enter the op invoke-debugger cli
command, depending on the script type, the CLI displays either the
(sdb) or (Pdb) prompt where you can enter debugging commands.
Sample Output
- op invoke-debugger cli (SLAX script)
- op invoke-debugger cli (Python script)
- op invoke-debugger cli script argument1 value1
op invoke-debugger cli (SLAX script)
user@host> op invoke-debugger cli script1.slax sdb: The SLAX Debugger (version ) Type 'help' for help (sdb)
op invoke-debugger cli (Python script)
user@host> op invoke-debugger cli script1.py (Pdb)
op invoke-debugger cli script argument1 value1
user@host> op invoke-debugger cli script2.slax interface ge-0/2/0.0 sdb: The SLAX Debugger (version ) Type 'help' for help (sdb)
Release Information
Command introduced in Junos OS Release 13.1.
Support for the Python debugger added in Junos OS Release 16.1.