title: get browsing state in a function
body: <p>I have a function such as this one :</p>
  <pre><code>fun &lt;- function() {
    browser()
    is_browsing()
  } 
  </code></pre>
  <p>I would like to know what the code of <code>is_browsing()</code> should be so it returns <code>TRUE</code> if the function is currently being browsed, so the console would look like this:</p>
  <pre><code>&gt; fun()
  Called from: fun()
  Browse[1]&gt; 
  debug at #3: is_browsing()
  Browse[2]&gt; 
  TRUE
  </code></pre>
  <p>However if I comment out the <code>browser()</code> line, or stop the browsing by pressing <code>c</code>, <code>is_browsing()</code> should return <code>FALSE</code>, like this:</p>
  <pre><code>&gt; fun()
  Called from: fun()
  Browse[1]&gt; c
  FALSE
  </code></pre>
  <p>I have read about <code>debuggingState()</code> and <code>isdebugged()</code> but they don't seem to be of much help in my situation.</p>
  <p>The real case FYI is about updating a plot or view as we browse, but only if we're browsing, if we're not I just want to plot/view once in the end, to spare resources.</p>