Debug pdb for Python in Linux

Source: Internet
Author: User

In Linux, you can use debugging at the interface and command line, where you record command-line debugging

    1. At the command line, use the

      python27-m pdb use_infix2postfix.py to enter debug mode

    2. >/root/py/algor/use_infix2postfix.py (7) <module> ()

      Import types This is the first statement of the script

    3. H (ELP)

(Pdb) H


Documented commands (Type help <topic>):

========================================

EOF BT Cont enable jump PP Run unt

A C continue exit L Q s until

Alias Cl D H List quit step up

Args Clear Debug Help n r tbreak W

b commands disable ignore next restart U whatis

Break condition down J P return Unalias where


can display the available parameters


4.

(Pdb) H n

N (EXT)

Continue execution until the next line in the current function

is reached or it returns.


5.

(Pdb) H n

N (EXT)

Continue execution until the next line in the current function

is reached or it returns.

In this way, you can find different usage parameters and details on your own.

Debug pdb for Python in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.