Plot2kill 0.2

David Nadlinger see at klickverbot.at
Fri Mar 11 16:40:38 PST 2011


On 3/12/11 12:41 AM, Simon wrote:
>> No, this doesn't quite cut it for debugging CTFE functions: While you
>> can obviously use pragma(msg, …) to write the *result* of a function
>> invoked via CTFE to standard output, this doesn't help you if you want
>> to debug the stuff going on *in* that function itself, for example to
>> track down one of the numerous CTFE bugs.
>> […]
>
> Never had a problem myself; and I've used some really hairy string
> mixins to create runtime & CTFE functions.
> Worse case, when composing functions is to print out the result and copy
> into a file and then debug as normal.
>
> It's neither elegant or convenient, but it works.

But not for the case mentioned above – first, because there is often no 
sane way to »print out the result«, and second, because if there are 
CTFE bugs involved, running the code at runtime (I guess that's what you 
meant with »debug as normal«) obviously doesn't help you in any way.

And yes, I had (or rather have) this problem myself, with not even that 
crazy code…

David


More information about the Digitalmars-d-announce mailing list