I’m coming from the angular 1.x / plain JS and experimenting with Ionic 2 (Angular 2 / typescript). I’m used to set break points or adding the debugger keyword and see my code in chrome. I’m trying to do the same with ionic 2 after running the command ionic serve but without success. I see the map files being created but in chrome I see only the app.bundle.js.
Hy, i tried your suggestion but when i try to debug an app on an android device with chrome dev tools and i hit save on the edited app.bundle.js the app closes, any idea why?
Thats asking too much for chrome dev tools, when inspecting device its aimed to see the code in the device, not modifying it, i think it’s not a good idea to do that, after all the js code in device is supposed to be transpiled down to ES5, and the debug showing in Typescript are due to SourceMaps, it’s not actual code.
I was asking because in ionic one i could do that, i mean save it in dev tools just until the session, of course it wasnt permanent after i closed the app that edit code disappeared, no problem with that, but know i cant do that in ionic2 when i hit save in the dev tools the app restarts so my session is gone so the code is gone
As i said, ionic 2 code is at least transpiled to ES5, so if you suddenly change the code to ES6 equivalent it will not be able to understand it and it will crash, or at least is what i think it should be happening, is what i expect to happen.
I am using ionic 2.2.0, is webpack the default bundler ? I think @mhartington said that they did not put a default bundler in ionic to leave possibilities open.