BASIC

Author Topic: Debug Mode  (Read 1927 times)

Offline Roy

  • Mc. Print
  • *
  • Posts: 3
    • View Profile
Debug Mode
« on: 2013-Mar-02 »
Hi I am new to GL BAsic but do not understand how to use the GUI debug mode other than to hit the debug icon and then compile the program. How can I then step through each instruction? :nw:

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3321
  • Integrated Brain
    • View Profile
Re: Debug Mode
« Reply #1 on: 2013-Mar-02 »
HI Roy the first Wellcome to the boards...

About using debug or not, you only have to pick the icon on appears

But if you want look whats happends in your code, you have to put this commands... Debug (See in the Help, press F1)

Then in the Compiler part, this it's the bottom part of the screen in my image it's a white part, you can test the values you want see...

I know whit debugger you can do more things, but really I never use... Be carefully in large Codes you have to wait a bit more than if you don't use debug...

Don't care any master will give you a more intersting answer than me, soon!!! don't care!.

Wellcome again, and enjoy of all the Community and GLbasic...

Iván J.


Offline hardyx

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 479
    • View Profile
Re: Debug Mode
« Reply #2 on: 2013-Mar-02 »
To use to Debug features you must to compile the app with debug activated. Then you can put breakpoints, wich are when you want to stop in the code execution and examine what's happening there. You can execute the code until you reach the breakpoint. You can see the values of active variables in the debug tab of the editor when you stop in a breakpoint. You can continue the execution, or you can go step by step watching the instructions executed and the variable values. This is very useful if some routine not works like you want or returns an unexpected value.

Here you can see at the margin of the code a breakpoint (in red) and the current execution point (in yellow).

« Last Edit: 2013-Mar-02 by hardyx »

MrTAToad

  • Guest
Re: Debug Mode
« Reply #3 on: 2013-Mar-02 »
In addition, the DEBUG statement is also very useful, as that outputs text in the Output window section of the IDE

Offline Roy

  • Mc. Print
  • *
  • Posts: 3
    • View Profile
Re: Debug Mode
« Reply #4 on: 2013-Mar-03 »
To use to Debug features you must to compile the app with debug activated. Then you can put breakpoints, wich are when you want to stop in the code execution and examine what's happening there. You can execute the code until you reach the breakpoint. You can see the values of active variables in the debug tab of the editor when you stop in a breakpoint. You can continue the execution, or you can go step by step watching the instructions executed and the variable values. This is very useful if some routine not works like you want or returns an unexpected value.

Here you can see at the margin of the code a breakpoint (in red) and the current execution point (in yellow).


Yes I can see the execution point and the breakpoint but how do you insert the breakpoint?

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1749
    • View Profile
    • Homepage
Re: Debug Mode
« Reply #5 on: 2013-Mar-03 »
F9 or the menus Edit->Breakpoints

Offline Roy

  • Mc. Print
  • *
  • Posts: 3
    • View Profile
Re: Debug Mode
« Reply #6 on: 2013-Mar-03 »
 =D Thank you for the info - I will now recommend the program to a friend of mine  :)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4057
    • View Profile
    • Portfolio
Re: Debug Mode
« Reply #7 on: 2013-Mar-03 »
I thank you guys too, I never used debug mode, now I know a bit more about it! :good: