title: debugging a function called from another function with RStudio
body: <p>I have two scripts, <em>main.r</em></p>
  
  <pre><code># test
  a = 1
  source("fun.r")
  b = fun(a)
  c = a + b 
  </code></pre>
  
  <p>and <em>fun.r</em></p>
  
  <pre><code># function
  fun &lt;- function(a){
      t = a*2
      b = t + 1
  } 
  </code></pre>
  
  <p>I put a breakpoint in <em>fun.r</em> at line 4 <code>b = t + 1</code>. The breakpoint is ignored by RStudio. When I run <em>main.r</em>, RStudio doesn't stop at line 4 in <em>fun.r</em>: as a matter of fact, it doesn't stop at all. How can I debug a function called from another function in RStudio?</p>