Reader for js debug output.

For AI and campaign script related discussions and questions
Post Reply
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Reader for js debug output.

Post by Duha »

Hi,

I make some tool to read output of js debug. (it is useful for windows, linux show it in console)
Its crossplatform desktop app.

Screenshot:
Spoiler:
Installation instructions:
Spoiler:
Linux:
nw wz_output_reader (sorry, not tested)

Windows:
nw.exe wz_output_reader

Set path to game executable.
Run game.

Repository:
https://bitbucket.org/Cjkjvfnby/wz_output_reader
Last edited by Duha on 09 Apr 2013, 00:56, edited 3 times in total.
http://addons.wz2100.net/ developer
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

He is any place where I can read about warzone command line avaliable params?
like --mod=<> and --debug
http://addons.wz2100.net/ developer
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Reader for js debug output.

Post by aubergine »

Command line params: http://developer.wz2100.net/wiki/CommandLineOptions -- I don't think it's a full list.

IIRC many of the command line params were deprecated or moved to the config file: https://warzone.atlassian.net/wiki/display/mod/config
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

update:
Rewrite it on coffescript.
Add game launcher/stopper
Add show common log.
Add path to executable input.

Download link https://bitbucket.org/Cjkjvfnby/wz_outp ... der_0.2.nw
Installation instructions:
Spoiler:
http://addons.wz2100.net/ developer
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

Another update now all objects is inspectable.

Add new javascript for inspection code. (https://bitbucket.org/Cjkjvfnby/wz_outp ... ?at=master)

https://bitbucket.org/Cjkjvfnby/wz_outp ... 2-11-09.nw
http://addons.wz2100.net/ developer
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Reader for js debug output.

Post by aubergine »

Code: Select all

}).call(this);
Why not just:

Code: Select all

})();
As that will have same effect, no?

Also, does that work in WZ env or just Node? (I've no experience with Node...)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

aubergine wrote:

Code: Select all

}).call(this);
Why not just:

Code: Select all

})();
As that will have same effect, no?
Yes same. It is CoffeeScript.compile :)
Also, does that work in WZ env or just Node? (I've no experience with Node...)
inspector.js works in WZ. (I check it in 3.1_RC3)
http://addons.wz2100.net/ developer
Originway
Trained
Trained
Posts: 412
Joined: 08 Aug 2012, 06:22

Re: Reader for js debug output.

Post by Originway »

oh cool, didn't see this topic before aubergine mentioned it! this should help we getting the warning message that Per was talking about. Thanks Duha!
does this work on 3.2 as well?
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

I think yes.
http://addons.wz2100.net/ developer
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Reader for js debug output.

Post by aubergine »

I've added a link to this tool in the Notes section on this wiki page: debug()
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: Reader for js debug output.

Post by Duha »

aubergine wrote:I've added a link to this tool in the Notes section on this wiki page: debug()
Did game write js debug to log file on Linux or just to console?
http://addons.wz2100.net/ developer
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Reader for js debug output.

Post by aubergine »

I don't know for sure, but I heard that on linux it writes to both log file and console! I think that was problem Per was facing when thinking about making debug() always write to log file, that on linux it would result in two copies of the debug() going in to log file.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Reader for js debug output.

Post by Per »

It does not automatically log to file on Linux, either. You have to ask it to do that using a command line option.
Post Reply