Python Forum
Is there a keyword that's equivalent to breakpoint for debugging?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a keyword that's equivalent to breakpoint for debugging?
#6
(Feb-16-2018, 11:15 AM)Larz60+ Wrote: check out this image:
   
Just click in the left margin to set breakpoint.
lower right window are watches, you can type variable names here, or even code, and it will show their values as you step through the program

The blue arrows are for (in order:
step to next line (single step)
step to next line executed
step to next line executed (but ignore libraries)
step into routine (subroutine for example)using any filters setup
step to first line executed after returning from method
run to line where cursor is located.

It works very well, and I use it all the time.

A trick I use in iterators is to set a counter to zero before entering the loop,
incrementing at the end of each iteration, and then placing some code like:
Python Code: (Double-click to select all)
1
2
if counter == 21:
    print('breakpoint here')
and setting the breakpoing to the print statement
you can do the same using the value of a programming variable like account number for example.


Thank you so much, you are always helpful.

(Feb-16-2018, 11:17 AM)Larz60+ Wrote: I'm getting confused, there are two threads on same subject that should be merged here

It's really up to you, whatever you see is alright with me.

Regards,
Reply


Messages In This Thread
RE: Is there a keyword that's equivalent to breakpoint for debugging? - by Tim - Feb-18-2018, 05:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Find a specific keyword after another keyword and change the output sgtmcc 5 872 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  pydev error pydev debugger: warning: trying to add breakpoint to file that does not e kwhhst 8 9,187 Jun-15-2019, 02:52 PM
Last Post: kwhhst
  equivalent commands saeed_balk 2 2,722 Sep-23-2018, 05:44 AM
Last Post: saeed_balk
  gdb breakpoint in python module Viesturs 0 2,237 Jul-27-2018, 02:02 PM
Last Post: Viesturs

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020