Console logging for a max plugin

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2012   #1
Console logging for a max plugin

I wonder if anyone here has tried debugging a plugin by printing info in the windows console, maybe the node name, hierarchy, etc. I tried this using the simple standard C++ ostream (cout), but i can't even make the console open. My plugin sets the Linker->System->Subsystem->Console (/SUBSYSTEM:CONSOLE) option but when the debugger starts, is hidden anyway.
Do I have to manually create the console in the plug-in initialization or is there an easier way of doing this?
 
Old 01 January 2012   #2
You can print to the output window in visualstudio.

see here:

http://www.windows-tech.info/18/5bc1830de822b81d.php
__________________
http://stigatle.no
 
Old 01 January 2012   #3
you also can print to maxscript listener with mprintf()
if it help you
 
Old 01 January 2012   #4
Quote:
Originally Posted by stigatle
You can print to the output window in visualstudio.

see here:

http://www.windows-tech.info/18/5bc1830de822b81d.php

The SDK also provides a function "DebugPrint" allowing easy string formatting, which is nice.
 
Old 01 January 2012   #5
Thank you guys, indeed all of those were useful, although a bit restrictive. The thing is I already have a dll logger which works in a windows console and i use for other enviroemnts, it will be perfect if I can redirect my logging printing of this max plugin to that dll, with those options you mention it will be tricky but let me try...
 
Old 01 January 2012   #6
Quote:
Originally Posted by dokdan85
you also can print to maxscript listener with mprintf()
if it help you


Thanks for this tip, I honestly did not know that, this is very useful!
__________________
http://stigatle.no
 
Old 10 October 2012   #7
Quote:
Originally Posted by dokdan85
you also can print to maxscript listener with mprintf()
if it help you


What do I have to include to use that? It doesn't know what it is from a new wizard generated modifier.
 
Old 10 October 2012   #8
try to include:
Code:
#include <stdio.h>
__________________
http://stigatle.no
 
Old 10 October 2012   #9
Quote:
Originally Posted by duke
What do I have to include to use that? It doesn't know what it is from a new wizard generated modifier.


try
#include "maxscrpt.h"
or
#include "maxscrpt\maxscrpt.h"
 
Old 10 October 2012   #10
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:42 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.