Results 1 to 3 of 3

Thread: How to jump over loops in thinDebug ?

  1. #1

    How to jump over loops in thinDebug ?

    Hi all,
    I was just playing with thinDebug. I would like to know, how can i jump over a loop in thinDebug. For example, i am playing with FileLine_TestReading.tBasic in example folder. It contains a loop to read the text from file. I don't want to waste my time by clicking in "Step in" button. Is there any option to completely step over the loop and go to next section of code ?

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,187
    Blog Entries
    2
    Rep Power
    10
    You can set a breakpoint on the code line you want to jump and then press Run (F5)
    Click image for larger version. 

Name:	thinDebug_BreakPoint_Set.jpg 
Views:	23 
Size:	106.2 KB 
ID:	9655
    Go to the line you want to jump to (it must be a script line, not a comment or empty line). Then set a breakpoint using CTRL + F2 or using the hand button in the toolbar.
    Then press Run button or F5 to start automatic execution

    thinBasic will execute the script until it will encounter a breakpoint and than stops



    Another useful way for complex script is to add breakpoint comments directly into your source script using right click into thinAir and then "Insert Code Block" / "Debugger BreakPoint" or inserting them manually.
    Click image for larger version. 

Name:	thinAir_InsertDebugBreakPoint.PNG 
Views:	25 
Size:	57.1 KB 
ID:	9656


    Breakpoint comments are special comments starting with '[breakpoint] text. Example:
    '[breakpoint] Stops just after main loop
    
    Click image for larger version. 

Name:	thinAir_DebugBreakPoint.PNG 
Views:	23 
Size:	54.9 KB 
ID:	9657

    They are intercepted by thinDebug when it starts.

    When inside thinDebug, pressing Run (F5) will execute your script but it will stop execution when it encounter a break point.

    Hope this help

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Hi Eros,
    Wow ! Great features. Let me check each of them. Thanks for your answer.

Similar Threads

  1. Music Loops
    By Charles Pegge in forum Shout Box Area
    Replies: 19
    Last Post: 19-08-2014, 20:23
  2. canvas loops and question
    By Lionheart008 in forum UI (User Interface)
    Replies: 4
    Last Post: 06-04-2011, 15:02
  3. Loops
    By Charles Pegge in forum O2h Compiler
    Replies: 0
    Last Post: 18-03-2009, 08:58
  4. Different loops type. Speed test script
    By ErosOlmi in forum Execution speed tests
    Replies: 2
    Last Post: 18-03-2007, 23:09
  5. thinBasic jump to version 1.0.9.5
    By ErosOlmi in forum Announcements
    Replies: 0
    Last Post: 28-04-2006, 18:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •