ShiVa3D
Any way to get at stdout from plugins?
ShiVa Plugin DevelopmentAny way to get at stdout from plugins?
by flippout » 01 Nov 2011, 23:27
I'm trying to debug a problem in my plugin which uses some code that does printfs().
Is there any way to see stdout when a plugin is run from the editor?
Is there any way to see stdout when a plugin is run from the editor?
- flippout
- Gold Boarder

- Posts: 279
Re: Any way to get at stdout from plugins?
by giggsy » 02 Nov 2011, 09:41
how about S3DX::log. or so? =)
-

giggsy - Platinum Boarder

- Posts: 1011
- Location: Austria
Re: Any way to get at stdout from plugins?
by flippout » 02 Nov 2011, 14:22
Indeed yes, that's what I'm doing now.
But it's a bit of a pain, as some of the code I'm using is also used in other solutions which don't include the S3DX headers.
Maybe I can pipe the output if I run the editor from the console? hmmm..
But it's a bit of a pain, as some of the code I'm using is also used in other solutions which don't include the S3DX headers.
Maybe I can pipe the output if I run the editor from the console? hmmm..
- flippout
- Gold Boarder

- Posts: 279
Re: Any way to get at stdout from plugins?
by NiCoX » 02 Nov 2011, 14:28
Hi,
On Windows you can just compile your plug-in in Debug, attach the ShiVaEditor process to Visual Studio, and use OutputDebugString to print debug logs.
On other platforms, it depends: on some, printf will work, on others NSLog will work, etc.
On Windows you can just compile your plug-in in Debug, attach the ShiVaEditor process to Visual Studio, and use OutputDebugString to print debug logs.
On other platforms, it depends: on some, printf will work, on others NSLog will work, etc.
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re: Any way to get at stdout from plugins?
by flippout » 02 Nov 2011, 14:32
It seems the express version of Visual Studio doesn't support attach to process 
Not a big deal... Maybe I can redefine printf somehow to do an S3DX::log.message() when compiling a plugin...
Not a big deal... Maybe I can redefine printf somehow to do an S3DX::log.message() when compiling a plugin...
- flippout
- Gold Boarder

- Posts: 279
Re: Any way to get at stdout from plugins?
by flippout » 02 Nov 2011, 14:35
Actually I take that back - I just discovered that I can enable that feature through tools->settings->expert settings. Sweeeet! No more log debugging!
- flippout
- Gold Boarder

- Posts: 279
6 posts
• Page 1 of 1