user944513
user944513

Reputation: 12729

how to debug issue javascript file in angular 2?

I download this example https://github.com/angular/angular2-seed .I am using webstrom editor and then use npm install then I use npm start..Apllication is running fine but I am not able to debug the app ..how I will debug the app? is there any way to debug the app

I follow all steps

Clone or fork this repository
Make sure you have node.js installed
run npm install to install dependencies
run npm start to fire up dev server
open browser to http://localhost:8080

Upvotes: 0

Views: 148

Answers (1)

jornare
jornare

Reputation: 2893

The webpack configuration on in this angular2 seed application is not configured to use sourcemaps. Have a look here: How do I generate sourcemaps when using babel and webpack? for some hints

In short: In your tsconf.json:

{
  "compilerOptions": {
    "module": "commonjs",
    "sourceMap": true //Set to true to get source maps from .ts, not .js
  },
  "files": [
    ...
  ]
}

In your webpack.config:

module.exports = {
  devtool: 'source-map', // to generate sourcemaps

Upvotes: 2

Related Questions