title: Running Node app with Spy.js does not recognize variables defined with let
body: <p>I'm trying to run a simple Node app that has a global variable defined with <code>let</code> and initialized in a function and then used in another (something like the following code)</p>
  
  <pre><code>let some_variable;
  
  a.doSomething(value =&gt; {
      some_variable = value;
      doSomethingElse();
  });
  
  function doSomethingElse() {
      // This is where I get the error
      console.log(some_variable);
  }
  </code></pre>
  
  <p>When running that Node app from command line or from WebStorm, it all goes well but when trying to run it with <a href="https://www.jetbrains.com/help/webstorm/spy-js.html" rel="nofollow noreferrer">Spy.js</a>, it doesn't recognize <code>some_variable</code> and says <code>some_variable is not defined</code>.</p>
  
  <p>I tried running with <code>--harmony</code> flag but it doesn't seem to make any difference.</p>
  
  <p>When changing <code>let some_variable</code> to <code>var some_variable</code> it seems to work, but that would require me to change the code of my entire app just to get it profiled by Spy.js which doesn't sound like a good idea.</p>
  
  <p>Any ideas how to make Spy.js recognize <code>let</code> variables? Am I missing a simple configuration flag?</p>
  
  <p>(Node version is 6.10.1)</p>