POV-Ray : Newsgroups : povray.general : Enabling debug output to console under Windows Server Time
23 Nov 2026 14:02:08 EST (-0500)
  Enabling debug output to console under Windows (Message 1 to 20 of 20)  
From: yesbird
Subject: Enabling debug output to console under Windows
Date: 4 Feb 2023 08:15:00
Message: <web.63de5a03b584c4734ad5859710800fb2@news.povray.org>
Hi,

Can anyone help me to enable debug prints to console under Windows(POV 3.8),
please ?
Spent 2.0 hours trying to find solution, command line options +GA +GD gives
nothing, scene has only one string:

#debug "----------------- DEBUG -----------------------------"

Console output in attachment, thanks in advance.
--
YB


Post a reply to this message


Attachments:
Download 'output.txt' (4 KB)

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 08:20:00
Message: <web.63de5b016feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> Can anyone help me to enable debug prints to console under Windows(POV 3.8),
> please ?
> Spent 2.0 hours trying to find solution, command line options +GA +GD gives
> nothing, scene has only one string:
>
> #debug "----------------- DEBUG -----------------------------"
>
> Console output in attachment, thanks in advance.

under Linux you need to supply the newline explicitly, ie "string\n".


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 08:30:00
Message: <web.63de5ce16feb0ae94ad5859710800fb2@news.povray.org>
> under Linux you need to supply the newline explicitly, ie "string\n".

Thanks, but it's not working for me, unfortunately now I'm tied to Windows by
Matlab license.


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 08:45:00
Message: <web.63de60ad6feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> > under Linux you need to supply the newline explicitly, ie "string\n".
>
> Thanks, but it's not working for me, unfortunately now I'm tied to Windows by
> Matlab license.

should work, no CLI options needed.  (thinking, platform actually should make no
difference)  however, if you use the 'all_file' option, all (console "#debug")
output should be in that (too).


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 09:05:00
Message: <web.63de64f06feb0ae94ad5859710800fb2@news.povray.org>
Hi,

Unfortunately, not, I've tried both:

#debug "----------------- DEBUG -----------------------------\n"
#debug "----------------- DEBUG -----------------------------\r"

and don't set 'all_file' option.
--
YB


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 09:20:00
Message: <web.63de691f6feb0ae94ad5859710800fb2@news.povray.org>
btw, under Linux works fine.


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 09:25:00
Message: <web.63de6a496feb0ae988a828ca6cde94f1@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> btw, under Linux works fine.

curious.  have attached a zip, run (in clean directory) the ini file.  does the
'alltext.out' created not show the '#debug' output? (at least of the first line,
ie '\n' terminated)


regards, jr.


Post a reply to this message


Attachments:
Download 'yb.zip' (1 KB)

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 09:50:00
Message: <web.63de6ffe6feb0ae91f9dae3025979125@news.povray.org>
You want:


input_file_name = try1.pov
all_file = true
output_file_name = try1
Debug_File=try1.txt


https://wiki.povray.org/content/Reference:Text_Output_Options#Directing_Text_Streams_to_Files


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 09:55:00
Message: <web.63de71386feb0ae94ad5859710800fb2@news.povray.org>
Hi,
looks like parsing problem:
------------------------------------------------------------------
/* try1 */

#version 3.7;

global_settings {assumed_gamma 1}

box {0,1}

// #declare s_ = "a string to display"; // This works
#declare s_ = "----------------- DEBUG -----------------------------"; // This
not

#debug concat(s_, "\n")

#warning "end-of-file"
------------------------------------------------------------------
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:05:00
Message: <web.63de73516feb0ae91f9dae3025979125@news.povray.org>
Yep, just get rid of the other stuff and only use:

input_file_name = try1.pov


Debug_File=try1.txt





I'd also replace the #warning with

#error "No objects in scene"

To stop the render phase


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:25:00
Message: <web.63de787e6feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> looks like parsing problem:
> ...
> // #declare s_ = "a string to display"; // This works
> #declare s_ = "----------------- DEBUG -----------------------------"; // This
> not

fwiw, cannot reproduce, works on the Linux box.  as a workaround (perhaps), will
breaking the string in to "{hyphens}", "DEBUG", "{hyphens}" inside the concat
work?  (in my own macros I tend to use the brackets, eg '--[someword]--' to
surround the (key)word)


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:25:00
Message: <web.63de78c86feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> ...
> #error "No objects in scene"

(there is one, though)


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:30:00
Message: <web.63de799b6feb0ae94ad5859710800fb2@news.povray.org>
-------------------------------------
/* try1 */

#version 3.7;

global_settings {assumed_gamma 1}

box {0,1}

// #declare s_ = "a string to display"; // THis works
#declare s_ = "----------------- DEBUG -----------------------------"; // This
not

#debug concat(s_, "\n")

#error "No objects in scene"
// #warning "end-of-file"
-------------------------------------
Gives:
"C:\temp\povtest\try1.pov" line 14: Parse Error: Parse halted by #error
directive: No objects in scene

without console output, but with debug print in try1.txt (attached).


Post a reply to this message


Attachments:
Download 'try1.txt' (1 KB)

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:35:00
Message: <web.63de7a946feb0ae91f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > ...
> > #error "No objects in scene"
>
> (there is one, though)
>
>
> regards, jr.

#declare your = 0;
#declare ears = 1;

// imma gonna
box {your, ears}

I was suggesting suppressing the render output until the other issue got
resolved  :P

I'm gonna get you a pendant that reads "Pedant".


Post a reply to this message

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:35:00
Message: <web.63de7b176feb0ae91f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> -------------------------------------
> /* try1 */
>
> #version 3.7;
>
> global_settings {assumed_gamma 1}
>
> box {0,1}
>
> // #declare s_ = "a string to display"; // THis works
> #declare s_ = "----------------- DEBUG -----------------------------"; // This
> not
>
> #debug concat(s_, "\n")
>
> #error "No objects in scene"
> // #warning "end-of-file"
> -------------------------------------
> Gives:
> "C:\temp\povtest\try1.pov" line 14: Parse Error: Parse halted by #error
> directive: No objects in scene
>
> without console output, but with debug print in try1.txt (attached).


Hi Sergey,

Excellent.   Now you can comment out the #error message and get on with what
you've been trying to do for the last several hours.

This is "fun", eh?

-Bill


Post a reply to this message

From: yesbird
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 10:50:00
Message: <web.63de7e8a6feb0ae94ad5859710800fb2@news.povray.org>
Hi,

> I'm gonna get you a pendant that reads "Pedant".
Thanks, this is a part of the profession )

> This is "fun", eh?
No doubt )

Final word: number of hyphens are matter - threshold is 14:

#declare s_ = "--------------";  // This works
#declare s_ = "---------------"; // This not

Regards,
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de82e66feb0ae91f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:

> "Final word"

HAhahahahahahahahahahahahahahahahaha!  Famous last words.  :D

I'm dying over here.

I'm getting output with:

#debug
"----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------\n"

But there is definitely something strange going on with the string size, the
output to the file, and possibly with concat ().


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de82f56feb0ae992a18f0689db30a9@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> Hi,
>
> > I'm gonna get you a pendant that reads "Pedant".
> Thanks, this is a part of the profession )
>
> > This is "fun", eh?
> No doubt )
>
> Final word: number of hyphens are matter - threshold is 14:
>
> #declare s_ = "--------------";  // This works
> #declare s_ = "---------------"; // This not

I just tested in the official Windows v3.7:
If there are several lines with 15 or more minuses, the first one is
converted to a solid horizontal line and the others are not shown.
It might be a feature - but I would consider it to be a bug.

Also, if you do not add a "\n" after the last debug line, it is
not shown.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: jr
Subject: Re: Enabling debug output to console under Windows
Date: 4 Feb 2023 11:10:00
Message: <web.63de83196feb0ae988a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> ...
> > This is "fun", eh?
> No doubt )

BE's not wrong though.  the parser is full of "surprises", and I think it's
pretty cool you should have managed to run into your first, so quickly :-).

re '#debug', although you can make strings longer than 255 chars, #debug will
silently truncate lines to its "preferred" limit; I once ran into this, if in
doubt emit short(er) lines/text.


> Final word: number of hyphens are matter - threshold is 14:

:-)


regards, jr.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Enabling debug output to console under Windows
Date: 5 Feb 2023 10:39:45
Message: <63dfcdc1$1@news.povray.org>
Op 4-2-2023 om 16:32 schreef Bald Eagle:
> #declare your = 0;
> #declare ears = 1;
> 
> // imma gonna
> box {your, ears}
> 

LOL!

-- 
Thomas


Post a reply to this message

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