Re: Where is the trace/debug command?

2021-10-07 Thread Wayne Stewart via 4D_Tech
Keith,

What I do is create a method that includes the following code:

If (Caps Lock Down)
TRACE
End if

Then I just put the method wherever I need it.

You could also add another flag to trigger the trace via an IP variable as
well for example.


Wayne

On Fri, 8 Oct 2021 at 11:36, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Thanks everyone for your replies.
> Yes, there are ways to force a trace using code, but I’m referring to
> those occasions where you simply want to check a piece of code without
> having to make code additions and then deletions.
> Very surprised it hasn’t been addressed by 4D yet as it’s a *very*
> annoying bug.
> Perhaps it’s being addressed in v19 (I have not even seen that one yet).
> Cheers, Keith
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

Regards,

Wayne
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-07 Thread Keith Goebel via 4D_Tech
Thanks everyone for your replies.
Yes, there are ways to force a trace using code, but I’m referring to those 
occasions where you simply want to check a piece of code without having to make 
code additions and then deletions.
Very surprised it hasn’t been addressed by 4D yet as it’s a *very* annoying bug.
Perhaps it’s being addressed in v19 (I have not even seen that one yet).
Cheers, Keith
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-07 Thread Pat Bensky via 4D_Tech
I have a method called MyTrace. This contains just a TRACE command. If I
need to insert a "hard" trace I call MyTrace. Then the TRACE can be
commented out when not needed.

On Thu, 7 Oct 2021 at 09:58, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > Le 6 oct. 2021 à 22:43, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com>
> a écrit :
> >
> > Randy, hi there.
> > [...] But that is a problem when you only want to stop and trace the
> first iteration of a loop. Then you have to restart 4D.
>
> Hi Keith,
> you may use assert:
>   for ($i;1;...)
> assert($i#1;"stop on first iteration only")
>   end for
>
> Another cool thing with assert is you can alt+clic on the "Continue"
> button in the dialog; it means "ignore all comming false asserts for this
> process". I tend to use ASSERT much more than TRACE or breakpoints, since a
> while.
>
> --
> Arnaud de Montard
>
>
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-07 Thread Arnaud de Montard via 4D_Tech

> Le 6 oct. 2021 à 22:43, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Randy, hi there.
> [...] But that is a problem when you only want to stop and trace the first 
> iteration of a loop. Then you have to restart 4D.

Hi Keith, 
you may use assert:
  for ($i;1;...)
assert($i#1;"stop on first iteration only")
  end for

Another cool thing with assert is you can alt+clic on the "Continue" button in 
the dialog; it means "ignore all comming false asserts for this process". I 
tend to use ASSERT much more than TRACE or breakpoints, since a while. 

-- 
Arnaud de Montard 


**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-06 Thread nug via 4D_Tech
place the TRACE command just outside the loop.

use a method call with a boolean process variable which you can change to 
allow/stop the trace action


> On Oct 6, 2021, at 4:43 PM, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Randy, hi there.
> Yes, after breakpoints fail to work, a Trace command does work. But that is a 
> problem when you only want to stop and trace the first iteration of a loop. 
> Then you have to restart 4D.
> I am very surprised the problem is unfixed in v18 though…
> Cheers, Keith
> 
>> On 7/10/2021, at 9:08 am, Randy Kaempen  wrote:
>> 
>> Keith,
>> 
>>> On Oct 6, 2021, at 3:03 PM, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com 
>>> > wrote:
>>> 
>>> Also, v17 had a severely bad habit of ignoring breakpoints after a short 
>>> time tracing code during development. I never did figure out what triggered 
>>> it (modifying code in a method currently being traced?).
>>> The only solution to get breakpoints working again was to restart 4D.
>> 
>> 
>> I have seen this a lot and it continues in v18.  Oddly, I never saw it in 
>> the v17 R releases.  I think it is a memory issue.  I find that the more 
>> forms and methods I have open, the sooner it happens.  As you said, the only 
>> solution is to restart 4D.
>> 
>> It was driving me nuts for a while, because I wouldn’t see a trace where it 
>> _had_ to happen.  I found that if I put in a TRACE command, that still 
>> showed up.  It was just the bullets that failed.  That’s how I can tell it’s 
>> happening.
>> 
>> 
>> Randy Kaempen
>> Intellex Corporation
> 
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-06 Thread Keith Goebel via 4D_Tech
Randy, hi there.
Yes, after breakpoints fail to work, a Trace command does work. But that is a 
problem when you only want to stop and trace the first iteration of a loop. 
Then you have to restart 4D.
I am very surprised the problem is unfixed in v18 though…
Cheers, Keith

> On 7/10/2021, at 9:08 am, Randy Kaempen  wrote:
> 
> Keith,
> 
>> On Oct 6, 2021, at 3:03 PM, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> Also, v17 had a severely bad habit of ignoring breakpoints after a short 
>> time tracing code during development. I never did figure out what triggered 
>> it (modifying code in a method currently being traced?).
>> The only solution to get breakpoints working again was to restart 4D.
> 
> 
> I have seen this a lot and it continues in v18.  Oddly, I never saw it in the 
> v17 R releases.  I think it is a memory issue.  I find that the more forms 
> and methods I have open, the sooner it happens.  As you said, the only 
> solution is to restart 4D.
> 
> It was driving me nuts for a while, because I wouldn’t see a trace where it 
> _had_ to happen.  I found that if I put in a TRACE command, that still showed 
> up.  It was just the bullets that failed.  That’s how I can tell it’s 
> happening.
> 
> 
> Randy Kaempen
> Intellex Corporation

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-06 Thread Randy Kaempen via 4D_Tech
Keith,

> On Oct 6, 2021, at 3:03 PM, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Also, v17 had a severely bad habit of ignoring breakpoints after a short time 
> tracing code during development. I never did figure out what triggered it 
> (modifying code in a method currently being traced?).
> The only solution to get breakpoints working again was to restart 4D.


I have seen this a lot and it continues in v18.  Oddly, I never saw it in the 
v17 R releases.  I think it is a memory issue.  I find that the more forms and 
methods I have open, the sooner it happens.  As you said, the only solution is 
to restart 4D.

It was driving me nuts for a while, because I wouldn’t see a trace where it 
_had_ to happen.  I found that if I put in a TRACE command, that still showed 
up.  It was just the bullets that failed.  That’s how I can tell it’s happening.


Randy Kaempen
Intellex Corporation
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-06 Thread Keith Goebel via 4D_Tech
I have encountered methods in the past that kept breaking into Trace mode 
without displaying a breakpoint.
For me, the breakpoint handling in 4D reached its lowest point with v17.
I saw methods that would continue to drop into Trace mode with no breakpoints 
showing. The only solution was
- create a new method
- copy in the code from the problem record
- delete problem method
- rename the new method (to the old method)

Also, v17 had a severely bad habit of ignoring breakpoints after a short time 
tracing code during development. I never did figure out what triggered it 
(modifying code in a method currently being traced?).
The only solution to get breakpoints working again was to restart 4D.
Cheers, Keith

PS 
If anyone knows what the trigger was or how to prevent 4D from ignoring 
breakpoints (using v17) I’d love to know as I’m doing a short stint of v17 work 
and am having to wrestle with this problem again.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-05 Thread Paul Chernoff via 4D_Tech
Sorry, I should have been specific that this is a normal method, it is part
of iLB package. But nothing special about it. The database code runs
without problem if run as compiled.

In iLB_Hook_Starup, a method used to run custom code to set values related
to iLB and is nothing but comments, it goes into debug mode after the last
line. I have tried removing the empty line of the method and the end of the
last line, and then typed in what I deleted. It still goes into debug mode
after running the method.

In iLB_Hook_ObjectMethod it goes into debug mode on the line that has the
command C_POINTER. I moved C_POINTER down a few lines and it went into
debug mode on C_LONGINT.

It makes me think there is something invisible in the Method that is
triggering debug mode. I’ve cut the text, pasted into BBEdit, then copied
from there and back into 4D and same problem.

I can work around this problem by compiling and then running the app in
compiled mode, but that is a bit clumsy.

—Paul



On Oct 5, 2021 at 3:00:01 PM, 4d_tech-requ...@lists.4d.com wrote:

> Message: 1
> Date: Mon, 4 Oct 2021 14:16:22 -0700
> From: Kirk Brooks 
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Re: Where is the trace/debug command?
> Message-ID:
> 
> Content-Type: text/plain; charset="UTF-8"
>
> It's probably not a trace but an error. What's iLB_Hook? Sounds like
> something there.
>
> On Mon, Oct 4, 2021 at 10:59 AM Paul Chernoff via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
> I am porting some 4D databases from v18.5 to v19.2. What is odd is that
>
> some iLB_Hook procedures are triggering tracing. But I look at the
>
> procedures and I do not see the Trace command nor the red circuit. And this
>
> never happened in version 18 or earlier. Is there now some invisible trace
>
> command?
>
>
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-05 Thread John J Foster via 4D_Tech
Hi All,

Barclay (author of iLB) has had issues where the Trace command in the source 
code files, when compiled with current versions of 4D v18/v19 will have this 
error.

I believe, Barclay has to either comment out the Trace commands and recompile 
OR write a wrapper around the Trace command so that it’s not called un less 
it’s a Source app.

I’ve cc’d Barclay and I am sure he is aware.

John...


> From: Kirk Brooks 
> Subject: Re: Where is the trace/debug command?
> Date: October 4, 2021 at 2:16:22 PM PDT
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> 
> 
> It's probably not a trace but an error. What's iLB_Hook? Sounds like
> something there.
> 
> On Mon, Oct 4, 2021 at 10:59 AM Paul Chernoff via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I am porting some 4D databases from v18.5 to v19.2. What is odd is that
>> some iLB_Hook procedures are triggering tracing. But I look at the
>> procedures and I do not see the Trace command nor the red circuit. And this
>> never happened in version 18 or earlier. Is there now some invisible trace
>> command?
>> 
>> —Paul Chernoff
>> **
>> 4D Internet Users Group (4D iNUG)
>> New Forum: https://discuss.4D.com
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> ******
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ==
> 
> 
> 
> 
> From: Wayne Stewart 
> Subject: Re: Where is the trace/debug command?
> Date: October 4, 2021 at 3:11:47 PM PDT
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> 
> 
> Kirk,
> 
> iLB is from listbox magic (Barclay Berry) distributed by Walt Nelson a few
> years back.
> It’s a hook method for the component.
> 
> Wayne
> 
> On Tue, 5 Oct 2021 at 08:16, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> It's probably not a trace but an error. What's iLB_Hook? Sounds like
>> something there.
>> 
>> On Mon, Oct 4, 2021 at 10:59 AM Paul Chernoff via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> I am porting some 4D databases from v18.5 to v19.2. What is odd is that
>>> some iLB_Hook procedures are triggering tracing. But I look at the
>>> procedures and I do not see the Trace command nor the red circuit. And
>> this
>>> never happened in version 18 or earlier. Is there now some invisible
>> trace
>>> command?
>>> 
>>> —Paul Chernoff
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> New Forum: https://discuss.4D.com
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **
>> 
>> 
>> 
>> --
>> Kirk Brooks
>> San Francisco, CA
>> ==
>> **
>> 4D Internet Users Group (4D iNUG)
>> New Forum: https://discuss.4D.com
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> -- 
> 
> Regards,
> 
> Wayne
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-04 Thread Wayne Stewart via 4D_Tech
Kirk,

iLB is from listbox magic (Barclay Berry) distributed by Walt Nelson a few
years back.
It’s a hook method for the component.

Wayne

On Tue, 5 Oct 2021 at 08:16, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> It's probably not a trace but an error. What's iLB_Hook? Sounds like
> something there.
>
> On Mon, Oct 4, 2021 at 10:59 AM Paul Chernoff via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
> > I am porting some 4D databases from v18.5 to v19.2. What is odd is that
> > some iLB_Hook procedures are triggering tracing. But I look at the
> > procedures and I do not see the Trace command nor the red circuit. And
> this
> > never happened in version 18 or earlier. Is there now some invisible
> trace
> > command?
> >
> > —Paul Chernoff
> > **
> > 4D Internet Users Group (4D iNUG)
> > New Forum: https://discuss.4D.com
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
>
>
>
> --
> Kirk Brooks
> San Francisco, CA
> ==
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

Regards,

Wayne
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Where is the trace/debug command?

2021-10-04 Thread Kirk Brooks via 4D_Tech
It's probably not a trace but an error. What's iLB_Hook? Sounds like
something there.

On Mon, Oct 4, 2021 at 10:59 AM Paul Chernoff via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am porting some 4D databases from v18.5 to v19.2. What is odd is that
> some iLB_Hook procedures are triggering tracing. But I look at the
> procedures and I do not see the Trace command nor the red circuit. And this
> never happened in version 18 or earlier. Is there now some invisible trace
> command?
>
> —Paul Chernoff
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
==
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Where is the trace/debug command?

2021-10-04 Thread Paul Chernoff via 4D_Tech
I am porting some 4D databases from v18.5 to v19.2. What is odd is that
some iLB_Hook procedures are triggering tracing. But I look at the
procedures and I do not see the Trace command nor the red circuit. And this
never happened in version 18 or earlier. Is there now some invisible trace
command?

—Paul Chernoff
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**