# Debugging ionic2 apps tool

**URL:** <https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543>\
**Category:** ionic-v3\
**Created:** [March 26, 2016, 10:47pm UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543 "2016-03-26T22:47:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![polska03](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@polska03](https://forum.ionicframework.com/u/polska03)\
**Post date:** [March 26, 2016, 10:47pm UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543/1 "2016-03-26T22:47:08Z")

</div>

Currently when I am debugging ionic2 apps I use Google Chrome’s Developer tool to inspect my device. I read the console for any errors. The problem I am faceing is when errors occur the error messages are usful but they don’t say where the occur. They just say where the error was called from the framework (e.g app.bundle.js:34121). It doesn’t though say which of my app pages are causing it. It would be useful if it said the error is occurring for instance on app.ts on line 5. Is there a way to get this type of debugging help. Most languages and frameworks work like this, for instance Java will give you a stacktrace and on the top usually it says which of your classes is causing the error and the line number.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 26, 2016, 11:13pm UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543/2 "2016-03-26T23:13:16Z")

</div>

Assuming you’re using TypeScript, try setting `"sourceMap": true` in your tsconfig.json, `pathinfo: true` in the `output` stanza of webpack.config.js, and `devtool: 'source-map'` also in webpack.config.js.

---

<div class="post-metadata">

**Author:** ![polska03](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@polska03](https://forum.ionicframework.com/u/polska03)\
**Post date:** [March 26, 2016, 11:51pm UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543/3 "2016-03-26T23:51:38Z")

</div>

Thanks! Is devtool also in the output stanza?

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 27, 2016, 12:07am UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543/4 "2016-03-27T00:07:10Z")

</div>

Ya I’d like more info on this too. I’ve used souremaps for debugging before, but for whatever reason with ionic it’s not generating sourcemaps. I tried the options you listed and that does give me the file name with each module in the final app.bundle.js, but I’d really like to get souremaps working.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 27, 2016, 3:34am UTC](https://forum.ionicframework.com/t/debugging-ionic2-apps-tool/47543/5 "2016-03-27T03:34:38Z")

</div>

No, it is its own stanza, at the same level of “entry”, “output”, and “module”.
