python:pdb command

Source: Internet
Author: User

1. WHERE (w) find out where the current code is running

2. List (l) displays a partial context of the current code

3. List <line number> Displays the context of the specified row

4. List <line Number1, line number2> Displays the code that specifies the start line to the end row

5. Up (U) returns to the last call point

6. Down (d) return to the next call point

7. Args (a) displays all current variables

8. Print (p) Prints expression results

9! Running the python command, such as!test= ' Hello ', will change the value of the test variable to Hello

Ten. PP printed beautified expression results

Step stepping runs to the downstream code (if the function is called, it runs to the first line of the called function)

Next runs to the downstream code (if the function is called, it runs through the function directly)

Until run to the bottom of the current code end

Return run to return code

Break <line number> Run-time set breakpoints

Continue running the program until the next breakpoint is encountered

<file break Name:line number> Set breakpoints for another file at run time

Break Show Breakpoint Condition

Disable <break number> invalidates the specified breakpoint (but exists)

Enable <break number> to take the specified breakpoint into effect

Clear <break number> Delete Breakpoint

Tbreak <line number> Runtime set temporary breakpoints (auto-delete after run)

Break <line number> <condition> Runtime set breakpoints, trigger breakpoints when condition conditions are met, Ex:break i > 10 means at 11th line of code, when the variable i is greater than 10 o'clock, touch Send Breakpoint

Condition <break number> <condition> setting trigger conditions for a specified breakpoint

Ignore <break number> <n> ignore specified breakpoint n times

Command <break number>. End writes a script to the specified breakpoint and automatically executes when the breakpoint is run

Ex

Command 1print("", i)print("" , J) Print ("", K) End

Jump <line number> jumps to the specified program line (if it is forward, the middle line code is ignored.) If it is back, the state is reset to a retrograde state)

Run <arg ... > Rerun program (Breakpoint settings are not lost)

python:pdb command

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.