Compiling Mnesia with debugging settings enabled?


According to the README doc in Mnesia’s test directory, it says

Normally Mnesia is compiled with the debug
functions disabled and this means that test cases which
requires this functionality will be skipped. The mnesia:ni(),
mentioned above, functions ensures that the interpreted code is
instrumented with Mnesia’s debug functionality. The mnesia:nc()
functions compiles Mnesia with the debug setting enabled.

But I cannot find anything on where mnesia:nc() (or mnesia:ni()) is? I am wondering if any one has dealt with this before?



I was trying to figure out the same thing today, you can get Mnesia with debug functions with by setting -Ddebug in ERL_COMPILE_FLAGS:

# In lib/mnesia/, with the compiler built
$ make clean
$ make ERLC=$(pwd)/../../bin/erlc ERL_COMPILE_FLAGS="-Ddebug"

However, with make test at least, some tests fail. I will post here if I figure something out :slight_smile: