title: Intellij debugger stuck on collecting data and showing "null" strings for Array[String] when programming in SCALA
body: <p>At the moment I am trying to use the IntelliJ debugger to see what is happening with my &quot;Strings&quot; for some weird reason it is not able to read any string. Show &quot;collecting data&quot; or &quot;null&quot; strings.</p>
  <p>I have searched online for a solution to this problem but wasn't able to find one. Does anyone have an idea what may cause this?</p>
  <p><strong>My code</strong></p>
  <pre><code>def printTest(): String = {
      var pre : Array[String] = (&quot;A * B + C&quot;).split(&quot; &quot;)
      var stringToBeReturned : String = &quot;&quot;
      for(x &lt;- 0 until pre.length){
          stringToBeReturned = stringToBeReturned + pre(x)
      }
  
      return stringToBeReturned
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/uYV1v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uYV1v.png" alt="enter image description here" /></a></p>
  <p><strong>The debugger when hitting the breakpoint:</strong></p>
  <p><a href="https://i.stack.imgur.com/7gVJU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7gVJU.png" alt="enter image description here" /></a></p>