title: Using "esm" in VSCode's NodeJs Debugger
body: <p>I am using Vscode.</p>
  
  <p>I have a js file filled with a dozen+ class definitions which I wanted to be available in another jsfile.
  So I used es6 imports in my other file, main.js</p>
  
  <pre><code>//main.js
  import * as Helper from './helperClasses.js';
  var myDoggy = new Helper.Pet("Fido");
  </code></pre>
  
  <p>But that wouldn't run with node, so I installed 'esm' with npm, and made a file called server.js, in which I added</p>
  
  <pre><code>//server.js
  require = require("esm")(module/*, options*/)
  module.exports = require("./main.js")
  </code></pre>
  
  <p>Now that runs with the code runner extension, or from a cmd window with the '-r esm' args (i.e. <code>node -r esm server.js</code>). But in the vsCode debugger, I get the following error:</p>
  
  <pre><code>import * as helper from './helperClasses.js';
         ^
  
  SyntaxError: Unexpected token *
  
  </code></pre>
  
  <p>I tried changing the configuration settings in launch.json as follows, but that did not work:</p>
  
  <pre><code>"configurations": [
          {
              "type": "node",
              "request": "launch",
              "name": "Launch Program",
              "program": "${workspaceFolder}\\game.js",
              "args": ["-r","esm","server.js"]
          }
      ]
  </code></pre>
  
  <p>I went and changed the .js extensions to .mjs, but then intellisense stopped working...</p>
  
  <p>Is there something I'm missing? This is my first time trying to use Node and I'm just trying to easily import some helper functions. </p>