[Mono-list] new debugging library loading

Jackson Harper jackson@ximian.com
Sat, 19 Jun 2004 19:48:03 -0700


Hello,

	There are now some new ways to debug library loading in the runtime.
Using the MONO_LOG_LEVEL and MONO_LOG_MASK environment variables it
should be easier to see where the runtime is looking for your libraries.
Here is a very brief rundown (real docs will follow). Also man mono will
explain the variables and their options.

If you are getting FileNotFoundException when loading a managed library
do this:
export MONO_LOG_LEVEL=debug
export MONO_LOG_MASK=asm
<run your app> 
You should get trace information on everywhere the runtime tries to load
that library from.


If you are getting DllNotFoundException when loading an unmanaged
library do this:
export MONO_LOG_LEVEL=debug
export MONO_LOG_MASK=dll
<run your app>
You should get trace information on the library names that the runtime
is trying to use and the errors in loading those libraries.


If you dont think the runtime is loading your libraries config files:
export MONO_LOG_LEVEL=debug
export MONO_LOG_MASK=cfg
<run your app>
The runtime will tell you where it is looking for your config files.


Hopefully this helps some people debug their setups. See the man page
for info on using more then one mask value and the various values for
the two variables.

Love,
Jackson