NIF debugging with GDB/Valgrind

I do have a debug emulator, and tested that valgrind and gdb are working. But I’m not sure how I can run something like iex -S mix with the debug emulator.

Is there a way I can run $ERL_TOP/bin/cerl -rvalgrind and load my mix project? Once I have the ebin folder with the BEAM files is it possible to do that?