BBC BASIC for Windows
« Breakpoints and use of immediate. »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:59pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Breakpoints and use of immediate.  (Read 1371 times)
bruceoboast
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 6
xx Breakpoints and use of immediate.
« Thread started on: Dec 3rd, 2011, 7:51pm »

I need to be able to make keyboard inputs while single stepping through a program. In QuickBasic, you could change the value of a variable by using the “Immediate” section of the debugging screen. Is there a way to do this in BB4W? The “Immediate button doesn’t seem to work that way.

Also, breakpoints could be set or reset while single stepping and breakpoints did not automatically reset when you hit them. If you came back to the breakpoint a second or more time, execution would pause again. This was very handy for jumping over large blocks of code. Is there anything similar in BB4W?

Bruce
User IP Logged

Bruce
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Breakpoints and use of immediate.
« Reply #1 on: Dec 3rd, 2011, 9:29pm »

on Dec 3rd, 2011, 7:51pm, bruceoboast wrote:
Is there a way to do this in BB4W?

The trouble with exiting to immediate mode in BBC BASIC is that (rather in the same way as with ON ERROR) the stack is cleared down. So you can't continue the program if it's in a PROC, FN or loop structure (e.g. FOR, REPEAT, WHILE). However if you only do it in the 'main loop', when the stack is empty anyway, it can be made to work.

Quote:
Is there anything similar in BB4W?

BB4W doesn't have 'breakpoints' as such, but if you insert a TRACE STEP ON in your code it will pause at that point and allow you to single-step. Since the 'breakpoint' is now part of the program it will take effect every time execution reaches that statement.

Richard.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Breakpoints and use of immediate.
« Reply #2 on: Mar 9th, 2014, 10:18am »

on Dec 3rd, 2011, 9:29pm, Richard Russell wrote:
BB4W doesn't have 'breakpoints' as such, but if you insert a TRACE STEP ON in your code it will pause at that point and allow you to single-step. Since the 'breakpoint' is now part of the program it will take effect every time execution reaches that statement.

Users of 'LB Booster' will be aware that the latest release of that tool does support breakpoints, and may be wondering how that is achieved given that it translates the program into BBC BASIC!

In fact what happens is that the breakpoint causes a TRACE STEP statement to be automatically inserted into the program at that point. In the context of BB4W therefore, inserting a TRACE STEP is to all intents and purposes the same as adding a breakpoint.

Note that a program will only pause at the TRACE STEP when run from the IDE. If 'compiled' to an executable the breakpoint will not cause execution to pause, but it may slow the program very slightly so ideally it's better to remove any breakpoints when they are no longer needed.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls