intellij-erlang icon indicating copy to clipboard operation
intellij-erlang copied to clipboard

Debugging in Intellij / Debuggin rebar3 Projects

Open chbest-btc opened this issue 6 years ago • 3 comments

I am not sure, if this is the correct place to ask my questions. If it is not, please inform me.

I have set up Intellij for erlang with your plugin. Intellij will now build and test erlang projects as soon as I stop typing. That is really great. Thanks for your good work.

The next step for me is enabling debugging within Intellij. As far as I understood from https://stackoverflow.com/questions/44534080/how-to-debug-a-erlang-project-with-intellij-idea/46785952#46785952 and as far as I was able to reproduce, the Intellij debugger is only able to debug, if and only if the source code and the beam files are in the same directory. Is this correct? Or is there a way to tell Intellij, that the source code is in one directory and the artefacts in another one? Or is there another comfortable way to debug rebar3 projects in Intellij?

chbest-btc avatar Oct 18 '17 13:10 chbest-btc

I suppose better ask @deadok22 about that.

ignatov avatar Oct 22 '17 09:10 ignatov

Any update on this?

kennedyjosh avatar Jun 22 '21 19:06 kennedyjosh

A workaround here is to compile the erl files you want to run yourself.

With a terminal, go into the source folder, start erl, and go c(my_app, [debug_info]).
This will build a beam file which lets you debug it.

For multiple files, I made a small file called compile with one c(mod,[debug_info]). line in it for each file I want to debug. Then if I want to recompile I'll just call cat ./compile | erl from the terminal in the src folder so it compiles everything for me and exits the erl shell automatically.

Regenhardt avatar Jan 30 '22 15:01 Regenhardt