[Gambas-user] No-op command
bb
adamnt42 at gmail.com
Sun Jul 18 19:40:35 CEST 2021
On Mon, 2021-07-19 at 02:58 +0930, bb wrote:
> On Sun, 2021-07-18 at 19:00 +0200, Tobias Boege via User wrote:
> > On Sun, 18 Jul 2021, Karl Reinl wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA512
> > >
> > > Am Montag, den 19.07.2021, 00:19 +0930 schrieb bb:
> > > > I need a Gambas command that does nothing, like a NOP, where I
> > > > can
> > > > set
> > > > a breakpoint for debugging, any good ideas?
> > > >
> > > > tia
> > > > bruce
> > > >
> > > >
> > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> > >
> > > Salut,
> > >
> > > Debug "stop" or Print "stop"
> > >
> >
> > In fact, there is a STOP keyword, which acts like a breakpoint.
> > But this is *always* a breakpoint when encountered in debug mode,
> > not something you can turn on or off dynamically.
> >
> > Otherwise, I'd use a constant statement like
> >
> > Pi
> >
> > It's short, quick, strange and reasonably easy to find for you
> > (but not easy to interpret for your coworkers, I guess). Unlike
> > Debug and Print, it does not pollute the output of your program.
> >
> > Best,
> > Tobias
> >
> Thanks guys,
> Both good ideas. I must remember them.
>
> For the specific case I have, I first tried Karl's idea with 'Debug
> "<this_method> has already been executed." and I got 800+ lines in
> stdout. Which is not a bad thing as I suspected an out of control
> loop
> was happening and now I know it is.
> Just "why" it is happening in an empty "else" block is interesting to
> say the least, but probably due to some very old code somewhere not
> near where I am looking.
>
> b
Bingo! Found it. The old "change the value of the loop control variable
many dozens of lines away from where I am looking trick". (In my
defense I will say that the loop is based on a very complex compound
control value.)
Thanks again.
b
More information about the User
mailing list