title: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context
body: <p>I am trying to create a simple debugging function that simply shows the caller of a function, like this:</p>
  
  <pre><code>function xe() {
    console.log(xe.caller().name)
  }
  </code></pre>
  
  <p>With this I would just be able to add <code>xe()</code> to a function and it will log the calls to the function– just a short, simple addition to help with debugging. Debugging sugar, so to speak.</p>
  
  <p>Unfortunately I get the error from the subject-line:</p>
  
  <blockquote>
    <p>TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context.</p>
  </blockquote>
  
  <p>I am using Babel/ES6, which injects <code>"use strict"</code> at the top of every module. This <em>may</em> be the cause, but searching has yielded limited information on why the error is raised, and I would like to understand it better.</p>
  
  <p>If strict mode is the problem I would prefer not to disable strict mode for the entire project– just for the module/function.</p>