Page 1 of 2

debug() in windows (3.1 rc2)

Posted: 04 Sep 2012, 09:26
by Duha
Hi,

I try to launch game from cmd (windows console) but it runs in separate process (like launching in linux terminal with &)
How can I get debug prints?

3.1 rc2
Win7-64

Re: debug() in windows (3.1 rc2)

Posted: 04 Sep 2012, 10:21
by NoQ
Hmm. Do you have anything interesting in logs/WZlog-*.txt?

Re: debug() in windows (3.1 rc2)

Posted: 04 Sep 2012, 10:36
by Duha
NoQ wrote:Hmm. Do you have anything interesting in logs/WZlog-*.txt?
No, just standard logs with "info" entries.

Re: debug() in windows (3.1 rc2)

Posted: 10 Sep 2012, 05:16
by vexed
All debug() statements will show in the log, if and only if it is turned on.
Info, Fatal, and something else is on by default, the rest you need to run the game like --debug=all (for everything), --debug=3d (for debug calls that use LOG_3D) and so on.

If you want to reroute to the console, then I think you can use 1>* 2>* or something along those lines...

Re: debug() in windows (3.1 rc2)

Posted: 10 Sep 2012, 05:54
by NoQ
The talk is about the JS debug() function.

Re: debug() in windows (3.1 rc2)

Posted: 11 Sep 2012, 03:39
by vexed
NoQ wrote:The talk is about the JS debug() function.
:hmm: :oops:
:stressed:

Shouldn't post late at night.

Re: debug() in windows (3.1 rc2)

Posted: 11 Sep 2012, 16:27
by NoQ
js_debug calls qWarning to print the text.

Re: debug() in windows (3.1 rc2)

Posted: 11 Sep 2012, 16:41
by Duha
NoQ wrote:js_debug calls qWarning to print the text.
void qWarning ( const char * msg, ... )
Calls the message handler with the warning message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if QT_NO_WARNING_OUTPUT was defined during compilation; it exits if the environment variable QT_FATAL_WARNINGS is defined.

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 09:27
by Duha
Duha wrote:
NoQ wrote:js_debug calls qWarning to print the text.
void qWarning ( const char * msg, ... )
Calls the message handler with the warning message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if QT_NO_WARNING_OUTPUT was defined during compilation; it exits if the environment variable QT_FATAL_WARNINGS is defined.
I solve it via external tool:
viewtopic.php?f=35&t=10080

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 14:37
by Per
So should I change javascript debug() to use the C debug() as a quick fix? Then it will show up in the log files, at least.

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 15:15
by Duha
Per wrote:So should I change javascript debug() to use the C debug() as a quick fix? Then it will show up in the log files, at least.
If you plan solid fix later, don`t spend you time for quick fix. I have work around this, it is not trouble for me anymore. But changes can break someone workflow.

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 17:14
by aubergine
Why not just have it do both - what it currently does and also put the debug in to the log file as well?

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 17:44
by Per
aubergine wrote:Why not just have it do both - what it currently does and also put the debug in to the log file as well?
Because on Linux that would print double of every debug line...

Re: debug() in windows (3.1 rc2)

Posted: 22 Oct 2012, 18:50
by aubergine
Could it do just one if it detects that it's running on linux? (I assume there is some way to detect which platform the game is being run on or compiled for?)

Re: debug() in windows (3.1 rc2)

Posted: 30 Oct 2012, 04:31
by aubergine
Where does debug output currently go on Mac OS X? It's not in the logs (as far as I can tell) and not sure how to see the stderr for an app launched via an icon in apps folder :s