[erlang-questions] Getting object code for module in on_init

Hans Elias B. Josephsen hansihe@REDACTED
Sun Mar 10 13:43:51 CET 2019


I am trying to get the object code for a module while inside the `on_init` function of that module.

Normally I would use `code:get_object_code(Module)`, but it seems like the .beam file might not have been written to disk yet at that point.

Yet, code in that module is running, so it must be located somewhere.

Is there any way to get the object code of the module itself while in that stage?



More information about the erlang-questions mailing list