Re: Debugging by old fashioned trace log printfs / writefln

2023-06-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 29, 2023 12:27:22 PM MDT Cecil Ward via Digitalmars-d-learn wrote: > I’m trying to debug my D program with old-fashioned printfs stuck > in various strategic places, actually using writefln(). My > problem is that the addition of printf fights with the existing > declarations

Re: Debugging by old fashioned trace log printfs / writefln

2023-06-30 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jun 30, 2023 at 03:43:14PM +, Cecil Ward via Digitalmars-d-learn wrote: [...] > Since I can pass my main function some compile-time-defined input, the > whole program should be capable of being executed with CTFE, no? So in > that case pragma( msg ) should suffice for a test

Re: Debugging by old fashioned trace log printfs / writefln

2023-06-30 Thread Cecil Ward via Digitalmars-d-learn
On Thursday, 29 June 2023 at 23:54:45 UTC, Chris Katko wrote: On Thursday, 29 June 2023 at 18:27:22 UTC, Cecil Ward wrote: I’m trying to debug my D program with old-fashioned printfs stuck in various strategic places, actually using writefln(). My problem is that the addition of printf fights

Re: Debugging by old fashioned trace log printfs / writefln

2023-06-29 Thread Chris Katko via Digitalmars-d-learn
On Thursday, 29 June 2023 at 18:27:22 UTC, Cecil Ward wrote: I’m trying to debug my D program with old-fashioned printfs stuck in various strategic places, actually using writefln(). My problem is that the addition of printf fights with the existing declarations for pure nothrow @nogc @safe

Re: Debugging by old fashioned trace log printfs / writefln

2023-06-29 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
```d debug { writeln("text"); } ``` ```d writeln(__MODULE__, ":", __LINE__, " ", "stuff"); ``` You'll need to wrap try/catch for flushing stdout however.

Re: Debugging by old fashioned trace log printfs / writefln

2023-06-29 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
```d debug writeln(__MODULE__, ":", __LINE__, " ", "stuff"); ``` Opps missed the debug.

Debugging by old fashioned trace log printfs / writefln

2023-06-29 Thread Cecil Ward via Digitalmars-d-learn
I’m trying to debug my D program with old-fashioned printfs stuck in various strategic places, actually using writefln(). My problem is that the addition of printf fights with the existing declarations for pure nothrow @nogc @safe and I have to adjust them, then put them back correctly when