Pdb cheatsheet Invoking the debugger Enter at the start of a program, from the command line: python –m pdb mycode.py Enter in a statement or function: import pdb # your code here if name 'main': # start debugger at the beginning of a function. We’ll show you a couple of PDB commands. You might also like this pdb cheat sheet. Print a variable name. $ python3 hello.py 0 /Users/awdeorio/hello.py (4) - os.mkdir (dirname) (Pdb) p dirname 'hello/world/' Change a value while the program is running. A cheatsheet for the Python Debugger (pdb) Awesome Open Source. Awesome Open Source. A cheatsheet for the Python Debugger (pdb) Stars. Most Recent Commit. Related Projects. Python (51,962)tex (1,089)latex (286)cheatsheet (187)pdb (26).
- Command CheatSheet
Command CheatSheet
h(elp)
Without argument, print the list of available commands. With a command name as argument, print help about that command.
w(here)
Print a stack trace, with the most recent frame at the bottom. An arrow indicates the “current frame”, which determines the context of most commands.
d(own)
Move the current frame one level down in the stack trace (to a newer frame).
u(p)
Move the current frame one level up in the stack trace (to an older frame).
b(reak)
: [ ([filename:]lineno | function) [, condition] ]
With a filename:line number argument, set a break there. If filename is omitted, use the current file. With a function name, set a break at the first executable line of that function. Without argument, list all breaks. Each breakpoint is assigned a number to which all the other breakpoint commands refer.
The condition argument, if present, is a string which must evaluate to true in order for the breakpoint to be honored.
tbreak
: [ ([filename:]lineno | function) [, condition] ]
Temporary breakpoint, which is removed automatically when it is first hit. The arguments are the same as break.
cl(ear)
: [bpnumber [bpnumber ..] ]
With a space separated list of breakpoint numbers, clear those breakpoints. Without argument, clear all breaks (but first ask confirmation).
disable bpnumber
: [bpnumber ..]
Disables the breakpoints given as a space separated list of breakpoint numbers. Disabling a breakpoint means it cannot cause the program to stop execution, but unlike clearing a breakpoint, it remains in the list of breakpoints and can be (re-)enabled.
enable bpnumber
: [bpnumber ..]
Enables the breakpoints specified.
ignore bpnumber count
Sets the ignore count for the given breakpoint number. If count is omitted, the ignore count is set to 0. A breakpoint becomes active when the ignore count is zero. When non-zero, the count is decremented each time the breakpoint is reached and the breakpoint is not disabled and any associated condition evaluates to true.
condition bpnumber condition
condition is an expression which must evaluate to true before the breakpoint is honored. If condition is absent, any existing condition is removed; i.e., the breakpoint is made unconditional.
s(tep)
Execute the current line, stop at the first possible occasion (either in a function that is called or in the current function).
n(ext)
Continue execution until the next line in the current function is reached or it returns.
unt(il)
Continue execution until the line with a number greater than the current one is reached or until the current frame returns.
r(eturn)
Continue execution until the current function returns.
run [args ..]
Restart the debugged python program. If a string is supplied it is splitted with “shlex”, and the result is used as the new sys.argv. History, breakpoints, actions and debugger options are preserved. “restart” is an alias for “run”.
c(ont(inue))
Continue execution, only stop when a breakpoint is encountered.
l(ist)
: [first [,last]]
Linux games for mac. List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With one argument, list 11 lines starting at that line. With two arguments, list the given range; if the second argument is less than the first, it is a count.
a(rgs)
Print the argument list of the current function.
p expression
Ipdb Commands
Print the value of the expression.
This is a cheat sheet for Oracle 12C R2 workshop Part I
Will conver those topics:
- EM
- CBD
- PDB
- Network
- User Security
- Tablespaces
Basic Information
Disk Informaiton
Instance Information
Create
Clone
Unplugging and Plugging a PDB
Unplugging
check compatiable
Plugging
Drop
Lifecycle
spfile/pfile
Load order:
- spfile
- pfile
View parameters:
- V$PARAMETER
- V$SPPARAMETER
- V$PARAMETER2
- V$SYSTEM_PARAMETER
Update
Diagnostic
adrci
Log DDL
Target file: /u01/app/oracle/diag/rdbms/orcl/ORCL/log/ddl_ORCL.log
Two files: Office 2016 for mac trial.
- listeners.ora: lnsrctl used
- tnsnames.ora: Network configuration file.
- /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
lsnrctl
Dynamic Listener
create a listener, named LISTENER2, that listens on the non-default port 1561 for all database
services
Static Listener for a PDB
create a listener named LISTENER_PDB1 that listens on the non-default port 1562 for the
PDB1.example.com service Drl simulator for mac.
TNS name
$ORACLE_HOME/network/admin/tnsnames.ora
Query
User
Pdb Cheat Sheet
Role
Profile
Audit Policy
Dictionary
Tablespace information:
- DBA_TABLESPACES
- V$TABLESPACE
Python Pdb Cheat Sheet
Data file information:
- DBA_DATA_FILES
- V$DATAFILE
Temp file information:
- DBA_TEMP_FILES
- V$TEMPFILE
Tables in a tablespace:
- ALL_TABLES