POV-Ray : Newsgroups : povray.programming : POV Debugging : Re: POV Debugging Server Time
28 Jul 2024 10:16:59 EDT (-0400)
  Re: POV Debugging  
From: Ron Parker
Date: 12 Mar 2002 09:21:40
Message: <slrna8s3nl.cfb.ron.parker@fwi.com>
On Tue, 12 Mar 2002 18:45:34 -0800, pcb wrote:
>> As for your question, there are no debugging facilities built in to the
>> parser, except for the ability to output strings to the debug stream.
> This
>> means you can't do breakpoints or single-stepping or any of the things you
>> might be used to in other languages.
> 
> OK - in that case I want to modify POV itself --------------

Well, understand that adding such functionality would be a fairly difficult
operation, as these things go.  The parser is a tricky, tricky beast, and
to make matters worse it has to be absolutely portable.  So if you want to
add that sort of thing, the first thing you'll have to do is learn how the
parser works.  Once you've done that, you have to come up with a reasonable
way to add hooks into the cross-platform parser code that platform-specific
debugger code can interface with.  In that way, you can have a full-featured
GUI debugger on, say, Windows or Mac, or a command-line debugger on Linux, 
or whatever else comes to mind.

Such functionality wouldn't be hard for someone who understands the parser
to add (though it might be harder to do it the right way...) but if you're
not familiar with the code, you should probably start by getting a handle
on the code in tokenize.h, tokenize.c, and the various parse*.* files.  In
particular, you'll want to pay attention to the tokenizer, since that's 
likely to be where your debugging takes place.

I'm curious: how would you specify where a breakpoint is to be set, short 
of clicking in the editor window and saying you want a breakpoint there?
That is, the editor is an add-on part of POV for Windows, so the link between
editor and renderer is purposefully somewhat tenuous.  If you can't use the
editor, can you come up with another way of specifying the breakpoint
location?   Line number, perhaps?

> >Finally, please don't top-post,
> 
> Haven't a clue what that it but I won't do it anyway

That's where you follow up to someone's post by putting the reply at the
top and the quoted material at the bottom.  It's usually accompanied by
the full text of the original post including the signature.  The post I'm
replying to has done it right, so you've got the general idea. 

>>and please edit the posts to which you're
>> replying to

I could use a little editing myself if that's what I wrote. :)

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.