title: Debugging the code of an external library in Intellij Idea
body: <p>I'm using SBT and IntellijIdea to run a project. I basically need to develop a module that relies on some other library to do its job. However, I want to "see" the control flow on the library while I'm debugging my project. That is:</p>
  
  <pre><code>-&gt; callToLibrary(...)
  </code></pre>
  
  <p>While debugging, I want to be able to enter this call and see the code of the external library. What are the configurations on Intellij Idea and SBT in order to do so?</p>
  
  <p><strong>Specifications</strong></p>
  
  <p>In order to be more precise assume my project has the following structure:</p>
  
  <pre><code>project-name
  -&gt; .idea
  -&gt; project[project-name-build]
  -&gt; src -&gt; main
         -&gt; test
  -&gt; target
  -&gt; build.sbt
  -&gt; External Libraries
  </code></pre>
  
  <p>Say I have the sources of my external library in some file stored in the path written in <code>directory</code>. Say this sources files are just a project cloned from Github. </p>
  
  <p>What would be the structure needed in the SBT file and the configuration in Intellij Idea in order to get the project working (not complaining with the imports) and being able to debug the project and the external library?</p>