intellij-ideaerlangintellij-14eunit

IntelliJ Erlang "Unresolved macros"


Setup:

IntelliJ IDEA 2022.2.2
Erlang plugin 0.11.1144
SDK: Erlang OTP 25, erts-13.0
Project Imported: https://github.com/FlowForwarding/enetconf

Issue: When I mouse over some macros, I get the message "Unresolved macros '?debugMsg'", "Unresolved macros '?assertEqual'", etc. As a result, I am unable to do a code walk-through. Please help me in resolving the issue.

Initial Debug: I see corresponding hrl files are included as listed below. But, when I mouseover the following line, I get a message "Unresolved include_lib: file not found". Looks like the hrl files are not included properly.

-include_lib("eunit/include/eunit.hrl").
-include_lib("xmerl/include/xmerl.hrl").

enter image description here

enter image description here


Solution

  • The issue got resolved after configuring Content roots as explained in https://www.jetbrains.com/help/idea/content-roots.html. The ContentRoot looked as follows.

    Content Root