Can't find TypeScript files in Chrome Debugger (v 2.1.14)

I have just updated to latest Ionic (2.1.14), latest node, Cordova, (everything) after a short while not looking at it, and started a default project (eg ionic start test), and then run using ionic serve. My node is v7.2.0

When running I cannot find the TypeScript files anywhere in the Chrome debugger, I can only see the generated js files. I Know I have been able to debug the TS files in the past.

Has there been any change here, should I be able to see them?

Thanks in advance

Sounds like you have created a v1 app, even though you have installed v2

A v2 app (that includes Typescript) needs --v2 on the ionic start

Alex

I did actually use the --v2 (my bad for not putting that in the post). It is definitely an Ionic 2 project and also with ts files. It is just when I serve it up in the browser I don’t see any of the source files (ts files) listed under the sources (as I have in the past), so I can’t open and debug into them.

I have since upgraded a second machine, and again created a blank project. I don’t see the .ts files in the Chrome debugger here either. I don’t see any external source map files, not sure if these may be embedded in the built bundle?

Is anyone else having this problem?

Add config to your package.json

  "description": "my-side-menu: An Ionic project",
  "config": {
    "ionic_source_map": "source-map"
  },

Thanks for the reply, but unfortunately I added this and still no TypeScript sources as can be seen below.

I have sourcemaps enabled in Chrome, but no source code anywhere.

I have submitted this as an Issue, as I would have thought this should be enabled by default, as debugging is pretty essential. However, still any other suggestions would be greatly appreciated!

Look under the build folder.

The ts files are under the build folder. scroll down a lot or just use Ctrl + P and search for .ts.
Missing source on chrome when debugging on device · Issue #407 · ionic-team/ionic-app-scripts · GitHub

I did look under the build folder, but I did have another look and they are not there at all…
image

However, it I do the Ctrl+P and enter the file name, I can THEN find them, so at least there is a way to get to them.

I wonder why the are not listed anywhere under the Sources?

Hi. I have the same problem. If I create an application with the command:

Ionic start --v2 TestApp sidemenu

… I can not debug any of the application’s .ts files: neither app.module.ts nor page1.ts nor page2.ts.

Ionic -v
2.1.14

With version 2 Beta (11, I think) I could.

+1

Hi. I have the same problem

There has been an issue logged for this at https://github.com/driftyco/ionic-app-scripts/issues/431

Ditto

I have the same issue