title: Debugging Ionic 2 in Visual Studio Code - How to Hit Breakpoints in Source Files?
body: <p><strong>Problem:</strong> 
  Breakpoints are only being hit in the concatenated build file www\build\js\app.bundle.js</p>
  
  <p><strong>Reproduce</strong></p>
  
  <ol>
  <li><p>I start the emulator, run the app on the emulator (this works perfectly)</p></li>
  <li><p>Set some breakpoints in app folder files e.g. <code>app/pages/list/list.js</code></p></li>
  <li><p>In VS Code>Debug Pane, I choose <code>Attach to running Android on Emulator</code>. Debugger runs and connects.</p></li>
  </ol>
  
  <p><strong>Actual Result</strong></p>
  
  <ol start="3">
  <li>The breakpoints are not hit in the original source files. They only get hit if I set them in the  build js file <code>www\build\js\app.bundle.js</code></li>
  </ol>
  
  <p><strong>Note on Sourcemaps</strong></p>
  
  <p>In <code>MyIonic2Project\.vscode\launch.json</code>, the settings for the Attach to Running on Emulator configuration are:</p>
  
  <pre><code>"sourceMaps": true,
  "cwd": "${workspaceRoot}",
  "ionicLiveReload": false
  </code></pre>
  
  <hr>
  
  <p><strong>My Setup</strong></p>
  
  <p>It's an Ionic 2 project, created using:</p>
  
  <pre><code>ionic start --v2 -a "My Ionic 2" MyIonic2Project tutorial
  </code></pre>
  
  <p>This works perfect with cli commands: on Chrome with <code>ionic serve</code>, emulator using <code>ionic emulate android</code>, and on the device as well (HTC One M8), so all is good up to this point :-)</p>
  
  <p>I have installed latest <em>Visual Studio Code</em>, and included the Cordova tools: <code>ext install cordova-tools</code></p>