Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang can't locate dependent applications when debugging

Tags:

erlang

I have an Erlang application that runs fine outside the debugger.

But when I try to debug it, it fails. It can't any dependent applications other than the ones that are "built in" to Erlang (e.g., crypto).

For example, here it can't find ranch

Error in process <0.63.0> on node 'test_node1398822489915@tppllc-Mac-Pro' with exit value: {{badmatch,{error,{"no such file or directory","ranch.app"}}},[{presence,start,0,[{file,"presence.erl"},{line,7}]}]}

When I run it not in the debugger, it can find it, and the application works. I use the same -pa paths to point to the dependent directories for both debugging and non-debugging runs.

like image 993
Thrill Science Avatar asked May 26 '26 22:05

Thrill Science


1 Answers

This turned out to be a bug with the IntellIJ Erlang plugin. It didn't pass the same parameters to erl in debug mode vs non-debug mode.

I reported it, and it was fixed:

https://github.com/ignatov/intellij-erlang/commit/1b400063df1e6dc92fde8aa23f852710775c4460

like image 181
Thrill Science Avatar answered May 28 '26 14:05

Thrill Science



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!