Running VASSAL in a debugger

I’m working on bug #2921 (several invisible traits in one place).

In order to understand better what’s going on, I needed to run the module in a debugger. It turned out to be harder to debug a VASSAL module than I expected, so I created a wiki page that describes how to set it up.

vassalengine.org/wiki/Debugging_Modules

Hi Ken,

You dont have to do that. There is a much easier way. Just bypass the ModuleManager and run the Editor or Player directly.

Just use a main class of VASSAL.launch.Editor and set the appropriate arguments. To edit a module use

–edit “D:\Vassal\Modules\Test\forBrent.vmod”

Regards,
Brent.

*********** REPLY SEPARATOR ***********

On 6/09/2010 at 8:36 PM fil512 wrote:

I’m working on bug #2921 (several invisible traits in one place).

In order to understand better what’s going on, I needed to run the
module in a debugger. It turned out to be harder to debug a VASSAL
module than I expected, so I created a wiki page that describes how to
set it up.

vassalengine.org/wiki/Debugging_Modules[1]

[1] vassalengine.org/wiki/Debugging_Modules

Thus spake “Brent Easton”:

Hi Ken,

You dont have to do that. There is a much easier way. Just bypass the ModuleM
anager and run the Editor or Player directly.

Just use a main class of VASSAL.launch.Editor and set the appropriate argumen
ts. To edit a module use

–edit “D:\Vassal\Modules\Test\forBrent.vmod”

Regards,
Brent.

Ken,

If you pass the --help command-line option to the Editor, Player, or Module
Manager, you’ll get a full list of the supported command-line options.

No editing of code is necessary to run any of these in a debugger.


J.

I was hoping there was some way to do that.

But when I run Player with the arguments --load /path/to/file.vlog I get the following error. It looks like it can’t find the path to the module to load. A more helpful error message would be useful here–do I need to specify the location of the module command-line as well?

07 Sep 2010 13:14:12.564 0 -- Starting
07 Sep 2010 13:14:12.564 0 -- OS Windows XP
07 Sep 2010 13:14:12.564 0 -- Java version 1.6.0_03
07 Sep 2010 13:14:12.564 0 -- VASSAL version 3.1.14
07 Sep 2010 13:14:12.564 0 -- Player
07 Sep 2010 13:14:12.673 0 java.lang.NullPointerException
	at VASSAL.launch.Player.createDataArchive(Player.java:121)
	at VASSAL.launch.Player.launch(Player.java:79)
	at VASSAL.launch.Launcher$2.run(Launcher.java:160)

Thus spake fil512:

I was hoping there was some way to do that.

But when I run Player with the arguments --load /path/to/file.vlog I get
the following error. It looks like it can’t find the path to the module
to load. A more helpful error message would be useful here–do I need
to specify the location of the module command-line as well?

I didn’t invest much effort into making this user-friendly becuase it’s
intended to be used this way only by developers. (Though it does say
this in the help message.)

You need to specify both the module and the log file you want to load
as arguments.


J.

The help text says:

VASSAL -l [option]... module|save|log...

which looks like you only need to supply one file…

Thanks for pointing me in the right direction. I have removed the link to the wiki page I created.

Thus spake fil512:

The help text says:

Code:
VASSAL -l [option]… module|save|log…

which looks like you only need to supply one file…

No, there are continuation dots following “module|save|log”, indicating
that you can specify several.


J.

This discussion helped me a lot to solve a problem today. Some gamers were stuck and I gave them a hand releasing a side that was stuck by a player who was unavailable. Thanks for making it easy.