Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
25f6fcc5
Kaydet (Commit)
25f6fcc5
authored
Nis 04, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more complete examples
üst
93dda331
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
18 deletions
+46
-18
libpdb.tex
Doc/lib/libpdb.tex
+23
-9
libpdb.tex
Doc/libpdb.tex
+23
-9
No files found.
Doc/lib/libpdb.tex
Dosyayı görüntüle @
25f6fcc5
...
@@ -12,9 +12,9 @@ stack frame. It also supports post-mortem debugging and can be called
...
@@ -12,9 +12,9 @@ stack frame. It also supports post-mortem debugging and can be called
under program control.
under program control.
The debugger is extensible --- it is actually defined as a class
The debugger is extensible --- it is actually defined as a class
\code
{
Pdb
}
. Th
e extension interface uses the (also undocumented)
\code
{
Pdb
}
. Th
is is currently undocumented but easily understood by
modules
\code
{
bdb
}
and
\code
{
cmd
}
; it is currently undocumented but
reading the source. The extension interface uses the (also
easily understood by reading the source
.
undocumented) modules
\code
{
bdb
}
and
\code
{
cmd
}
.
\ttindex
{
Pdb
}
\ttindex
{
Pdb
}
\ttindex
{
bdb
}
\ttindex
{
bdb
}
\ttindex
{
cmd
}
\ttindex
{
cmd
}
...
@@ -25,13 +25,20 @@ specific modules).
...
@@ -25,13 +25,20 @@ specific modules).
\index
{
stdwin
}
\index
{
stdwin
}
\ttindex
{
wdb
}
\ttindex
{
wdb
}
The debugger's prompt is ``
\code
{
(Pdb)
}
''.
Typical usage to run a program under control of the debugger is:
Typical usage to run a program under control of the debugger is:
\begin{verbatim}
\begin{verbatim}
>>> import pdb
>>> import pdb
>>> import mymodule
>>> import mymodule
>>> pdb.run('mymodule.test()')
>>> pdb.run('mymodule.test()')
(Pdb)
> <string>(0)?()
(Pdb) continue
> <string>(1)?()
(Pdb) continue
NameError: 'spam'
> <string>(1)?()
(Pdb)
\end{verbatim}
\end{verbatim}
Typical usage to inspect a crashed program is:
Typical usage to inspect a crashed program is:
...
@@ -40,13 +47,19 @@ Typical usage to inspect a crashed program is:
...
@@ -40,13 +47,19 @@ Typical usage to inspect a crashed program is:
>>> import pdb
>>> import pdb
>>> import mymodule
>>> import mymodule
>>> mymodule.test()
>>> mymodule.test()
(crashes with a stack trace)
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "./mymodule.py", line 4, in test
test2()
File "./mymodule.py", line 3, in test2
print spam
NameError: spam
>>> pdb.pm()
>>> pdb.pm()
(Pdb)
> ./mymodule.py(3)test2()
-> print spam
(Pdb)
\end{verbatim}
\end{verbatim}
The debugger's prompt is ``
\code
{
(Pdb)
}
''.
The module defines the following functions; each enters the debugger
The module defines the following functions; each enters the debugger
in a slightly different way:
in a slightly different way:
...
@@ -111,7 +124,8 @@ Commands that the debugger doesn't recognize are assumed to be Python
...
@@ -111,7 +124,8 @@ Commands that the debugger doesn't recognize are assumed to be Python
statements and are executed in the context of the program being
statements and are executed in the context of the program being
debugged. Python statements can also be prefixed with an exclamation
debugged. Python statements can also be prefixed with an exclamation
point (``
\code
{
!
}
''). This is a powerful way to inspect the program
point (``
\code
{
!
}
''). This is a powerful way to inspect the program
being debugged; it is even possible to change variables. When an
being debugged; it is even possible to change a variable or call a
function. When an
exception occurs in such a statement, the exception name is printed
exception occurs in such a statement, the exception name is printed
but the debugger's state is not changed.
but the debugger's state is not changed.
...
...
Doc/libpdb.tex
Dosyayı görüntüle @
25f6fcc5
...
@@ -12,9 +12,9 @@ stack frame. It also supports post-mortem debugging and can be called
...
@@ -12,9 +12,9 @@ stack frame. It also supports post-mortem debugging and can be called
under program control.
under program control.
The debugger is extensible --- it is actually defined as a class
The debugger is extensible --- it is actually defined as a class
\code
{
Pdb
}
. Th
e extension interface uses the (also undocumented)
\code
{
Pdb
}
. Th
is is currently undocumented but easily understood by
modules
\code
{
bdb
}
and
\code
{
cmd
}
; it is currently undocumented but
reading the source. The extension interface uses the (also
easily understood by reading the source
.
undocumented) modules
\code
{
bdb
}
and
\code
{
cmd
}
.
\ttindex
{
Pdb
}
\ttindex
{
Pdb
}
\ttindex
{
bdb
}
\ttindex
{
bdb
}
\ttindex
{
cmd
}
\ttindex
{
cmd
}
...
@@ -25,13 +25,20 @@ specific modules).
...
@@ -25,13 +25,20 @@ specific modules).
\index
{
stdwin
}
\index
{
stdwin
}
\ttindex
{
wdb
}
\ttindex
{
wdb
}
The debugger's prompt is ``
\code
{
(Pdb)
}
''.
Typical usage to run a program under control of the debugger is:
Typical usage to run a program under control of the debugger is:
\begin{verbatim}
\begin{verbatim}
>>> import pdb
>>> import pdb
>>> import mymodule
>>> import mymodule
>>> pdb.run('mymodule.test()')
>>> pdb.run('mymodule.test()')
(Pdb)
> <string>(0)?()
(Pdb) continue
> <string>(1)?()
(Pdb) continue
NameError: 'spam'
> <string>(1)?()
(Pdb)
\end{verbatim}
\end{verbatim}
Typical usage to inspect a crashed program is:
Typical usage to inspect a crashed program is:
...
@@ -40,13 +47,19 @@ Typical usage to inspect a crashed program is:
...
@@ -40,13 +47,19 @@ Typical usage to inspect a crashed program is:
>>> import pdb
>>> import pdb
>>> import mymodule
>>> import mymodule
>>> mymodule.test()
>>> mymodule.test()
(crashes with a stack trace)
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "./mymodule.py", line 4, in test
test2()
File "./mymodule.py", line 3, in test2
print spam
NameError: spam
>>> pdb.pm()
>>> pdb.pm()
(Pdb)
> ./mymodule.py(3)test2()
-> print spam
(Pdb)
\end{verbatim}
\end{verbatim}
The debugger's prompt is ``
\code
{
(Pdb)
}
''.
The module defines the following functions; each enters the debugger
The module defines the following functions; each enters the debugger
in a slightly different way:
in a slightly different way:
...
@@ -111,7 +124,8 @@ Commands that the debugger doesn't recognize are assumed to be Python
...
@@ -111,7 +124,8 @@ Commands that the debugger doesn't recognize are assumed to be Python
statements and are executed in the context of the program being
statements and are executed in the context of the program being
debugged. Python statements can also be prefixed with an exclamation
debugged. Python statements can also be prefixed with an exclamation
point (``
\code
{
!
}
''). This is a powerful way to inspect the program
point (``
\code
{
!
}
''). This is a powerful way to inspect the program
being debugged; it is even possible to change variables. When an
being debugged; it is even possible to change a variable or call a
function. When an
exception occurs in such a statement, the exception name is printed
exception occurs in such a statement, the exception name is printed
but the debugger's state is not changed.
but the debugger's state is not changed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment