Unable to trace common_test module

I am trying to trace/debug ct_netconfc module in order to understand its internals.

I tried the ErlyBerly tracing application as mentioned below. But I could not Trace the module. Please help me resolve the issue.

If not ErlyBerly, please suggest to me any other application to trace the ct_netconfc and other common_test modules.


I started a Erlang shell and started the test command make common_test_test ARGS="-suite ct_netconfc_SUITE" as follows.

bhuvan@vm-alarm:~/git/otp$ erl -sname node1

(node1@vm-alarm)1> os:cmd("make common_test_test ARGS=\"-suite ct_netconfc_SUITE\"").

I started ErlyBerly application as follows.

bhuvan@vm-alarm:~/git/erlyberly$ java -jar target/*runnable.jar

As the test command make common_test_test ARGS="-suite ct_netconfc_SUITE" continue to execute, I see three different nodes listed in the ErlyBerly GUI namely ct, test_server, node1.


When tried to connect to the node ct, I get an error “Cannot connect to the peer node”. Why is this error coming?

enter image description here

In fact, I am able to trace another sample Erlang application (not a ct module) using Tracing applications such as ErlyBerly, Debugger.


I think that for ct_netconfc_SUITE the tests calling ct_netconfc might be executing in separate Erlang node. This might require some extra step for configuring and also maybe trying to connect not to main node.

I also can’t trace ct_netconfc module normally when executing ct_netconfc_SUITE.
Tracing the ct_netconfc module from shell is possible, so I speculate it must be issue related to test suite setup.

1 Like

Thanks @kuba. Which module do you suggest for tracing from shell (I see lot many tracing modules namely Debugger, dbg, etc)?

I see that ErlyBerly GUI lists 3 nodes namely ct, test_server & node1 (testing is started from the user-created node1). Do you mean that the ct_netconfc is executed in a different node other than this?

1 Like

I configured tracing with dbg module and then called some function from ct_netconfc.

etnt/edbg: A simple tty interface to the Erlang debugger and tracer. (github.com) is nice alternative to using plain dbg.

I think the name is dynamic and present in test logs. Something like:
[RUN #1] Calling ct:run_test … on ‘ct@…’

1 Like

On 2nd day ;-), I think I would recommend to modify the real test suite code so it enables wanted traces with dbg and redirects them to a file.

1 Like

Thank you @kuba. I will try as you suggested, once I recover from my current unwellness.