How to show the current line number with pdb.set_trace()

P

Peng Yu

After starting pdb.set_trace(), python doens't show line number. Could
you let me know how to print the number by default so that I know
where the current line is?
 
M

Miki

Hello,
After starting pdb.set_trace(), python doens't show line number. Could
you let me know how to print the number by default so that I know
where the current line is?
When you get the PDB prompt, just type "l". It'll show some code with
an error
on the current line.

You can also type "?" for help.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,172
Messages
2,570,935
Members
47,479
Latest member
JaysonK723

Latest Threads

Top