Author Topic: I can't get breakpoints to work, what am I doing wrong  (Read 2938 times)

Offline Nathan

  • Mr. Polyvector
  • ***
  • Posts: 116
    • View Profile
So within the IDE, I press F9 to add a breakpoint to the program.
I also make sure debugging is toggled to ON.

I then press F5 to compile and run the program, but it never pauses or stops for me to step through the code, do I need to do something else?

I'm running IDE version 9.040 under Vista x64.

MrTAToad

  • Guest
Thats odd - breakpoints should be working fine.  Can you try the following code :

LOCAL a%

PRINT "hello",0,0
SHOWSCREEN
KEYWAIT

a%=1
DEBUG a%+"\n"
KEYWAIT

and set the breakpoint on the a% = 1 line.

I've got a quick video of the debugger being used here :


« Last Edit: 2011-Mar-22 by MrTAToad »

Offline Nathan

  • Mr. Polyvector
  • ***
  • Posts: 116
    • View Profile
Thanks for your response.

I'm at work at the moment, which is a Windows XP Pro machine, I downloaded the (free) SDK and gave your example a go, and it definitely "breaked" at the a% = 1 line so I now know what to expect.

I'll try the same example at home tonight and see how it behaves, but even in my simplist of programs it has failled to pause execution.

Does anyone else on here with Vista x64 (or any Windows 64 bit) have the same problem?

Offline Moebius

  • Dr. Type
  • ****
  • Posts: 315
    • View Profile
I've found breakpoints don't work on lines that are blank, just declare vars using LOCAL/GLOBAL, and in other cases.

Putting them on lines where there are function calls or variables are set, etc. always works for me though.
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

Offline Nathan

  • Mr. Polyvector
  • ***
  • Posts: 116
    • View Profile
Ah yeah, that could be the issue, thanks, I'll definitely give that a go tonight. :)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Also the very first line is not triggering. Don't ask me why  :|

Offline Nathan

  • Mr. Polyvector
  • ***
  • Posts: 116
    • View Profile
I've found breakpoints don't work on lines that are blank, just declare vars using LOCAL/GLOBAL, and in other cases.

Putting them on lines where there are function calls or variables are set, etc. always works for me though.

This was the problem exactly, thanks for that. :good: