-
Notifications
You must be signed in to change notification settings - Fork 310
continued missing source map debug issues #289
Comments
Published as I'll keep this open to track Thanks, |
Even though the source maps are now there, they are transpiled js files, not the original TS files. That being said, not being able to use the correct sources is like not being able to use sourcemaps at all. Keep up the good work Dan ....waiting for the new, fixed 40 version 👍 |
I'm testing last master code and maps are not well generated, at least using windows. |
When main.js.map worked with v 0.0.34 it produced this (shortened version):
So all custom .ts files were included as well as all files in node folder: node_modules |
Tested with 0.0.41 now the maps are found but the breakpoints do not work. |
Using any of the latest Ionic 2 RC2 starter projects, settings breakpoints don't work out of the box with the 0.0.38 version of ionic-app-scripts. The 'temporary' workaround I found was to explicitly use version 0.0.34 of ionic-app-scripts, and breakpoints get hit again. @jmesa-sistel's new opened issue 330 (maybe a dupe to this?) also repro with other Ionic 2 starter projects I've tried as well. |
same problem =( ionic cli 2.1.4 |
@lordgreg, yes we are testing. When you do a When you run Here is an example of the default You also have the option to override the webpack Would love to hear what we could do better, but for now I'm going to close this issue as it appears to be resolved. Please let me know if it's not and we're misunderstanding something. Thanks, |
@danbucholtz thank you for very fast reply, thumbs up for that. However, your assumption that I'm running two different builds was false. The screenshot above was made on top of single As you said, switching config to
shows me source like that: which is also completely wrong since there is no folder structure or anything. The whole process of development really became a struggle. The ionic-app-scripts as they are now, are, for developer, not so usable. That being said, I cannot understand this issue being closed since the source in browser isn't the same as source in my editor. Maybe there is also something I am missing and am just being to negatively-oriented. Maybe I am using the developers process totally wrong? Please, give us/me advice how Ionic Team is debugging/testin/developing TypeScript-based Ionic 2 app. It really looks I/we went into completely wrong direction. |
Hey Dan, Can you share out a simple workflow on setting and hitting a breakpoint in one of the ionic start apps? (e.g. ionic start myApp blank --v2, or even, ionic start MyIonic2Project tutorial --v2) That way we can also verify and ingest the debug/testing workflow that you guys have - since it sounds like for your guys' environment, it's working. Builds 40 and 41 of app-scripts didn't work for me on a fresh ionic environment, so I think there is a bug hiding somewhere. Build 34 was the only version I could get debugging working again, but it's not a very sustainable solution. Thanks |
We just open Chrome dev tools, look in the To be clear, we know we need to have better debugging support and source maps on the device via Thanks, |
Awesome, Chrome dev tools did the trick. Thanks for sharing! My personal workflow included using VS Code + Cordova tools to debug through the code. Looks like there is a known issue where the Cordova Tools needs to be updated to accommodate the latest Ionic 2 changes, and somehow, v.34 of the app-scripts enabled this scenario. I'm unblocked now, and have a path to debug. Thanks again Dan! |
Debugging doesnt work with Visual Studio 2015 and Ionic RC2 + App Scripts v. 0.0.43. Breakpoint will not be hit. However it was worked with app-scripts version 0.0.36 + RC1 |
We'll look into it likely in a few weeks but for now the best bet is going to be to debug in Chrome. I'm not sure that Webpack supports debugging in IDEs, etc. Thanks, |
i just canceld my ionic subscription. This is the dumbest ive ever heard. Ionic is mostly used for Mobile applications, now what if i use like an accountmanager or any other native functionality. How do i debug these functions in a browser?! |
Very sorry to hear that. Here's how you debug in a Chrome. This is how the overwhelming majority of web development and debugging occurs:
Here's more info on the Chrome DevTools. They are incredibly useful and I cannot imagine using Ionic or another development toolset without them. Thanks, |
@kaiwenC, yep, we are working with the VSCode team to get this working again. It hasn't worked since RC0 and we're working on it. More than likely it will work with Visual Studio proper, too. Thanks, |
@danbucholtz your solution might work if you aren't using any native functions but as soon as you use cordova.exec youre lost. Is there any way to remove the webpack stuff? |
@Rainson12, We are working with the VSCode team to get the source map thing fixed. It will be fixed soon. It's high priority for us. Thanks, |
thanks @danbucholtz we'll wait. |
If you add a Thanks, |
@danbucholtz
in package.json and I have changed lauch.json Now I can debug properly using rollup. The next test was try webpack. PS
Notice "type": "chrome", I'm using chrome extension here.
|
@danbucholtz When building the app i get a lot of
is there any way to remove hide these yellow lines or even fix them? When building with app scripts 0.0.43 I also get crtitical error: |
@morrisonbrett |
@rafaelcb21 Here's my package.json { |
@rajpat Run |
Thanks for your response Here's the output from > ionic build command C:\Working\AEMES\Mobility\Client\OilEntryApp>ionic build Running 'build:before' npm script before build npm ERR! missing script: build npm ERR! Please include the following file with any support request: C:\Working\AEMES\Mobility\Client\OilEntryApp> |
@rajpat You're having basic ionic issues, unrelated to this issue. One thing that I find is helpful is to remove the |
@morrisonbrett This does not seem to work for me, I;m trying this on a clean Ionic project indented all of the @component as you suggested and I still get this: @danbucholtz Is there any progress in fixing this ? its been weeks since I last worked with Ionic because of this, and it seems I'm not the only one... |
Try pressing |
@morrisonbrett and in the ide: |
Try this: Look at We are likely going to make some changes here in the coming weeks. Just need time to do it. Thanks, |
RC4 fixed the issues I was having with debugging |
@morrisonbrett |
A few observation on an OSX env, using the latest app-scrips ([email protected]), and trying to debug in Safari (running the app in the iOS emulator):
creates the source maps and I do get to see them in Safari. Which is cool, IF rollup didn't have huge issues with export/imports and breaks the build process more than it helps it. Also I believe the money is on webpack. That said, this:
also creates a *.map file, BUT Safari is not picking it up. Any other value for Can someone confirm?..or is it just me? ...again ;-) |
Thanks, |
Just hopping in here to say that I'm having this issue when trying to build an Ionic app for ios, and @joergnigbur 's solution worked for me but @morrisonbrett 's did not. I'm not smart enough to know why. Maybe I missed a component somewhere, but I don't have that many. Heh. |
Hey @danbucholtz , any updates/insights as to why Safari acts up? |
No news. Lower priority for us right now since most devs develop on Chrome. We are open to a PR here. We're very focused on enabling better tree shaking and dead code removal. Thanks, |
Hi @danbucholtz, When reading your replies I understand the Ionic Team encourages people to work with In my job I see a lot of developers working in their browser most of the time : theirs apps are slow and provide a bad user experience. Developing on real devices should be the norm and I CAN'T understand that you would focus and encourage people to work in the desktop. You were speaking of Chrome Devtools. They are available on Android too notably via Crosswalk which provide recent Chrome Devtools on all supported platforms. This is very usable and I DON'T see any reason to develop (most of the time) in the browser instead of a real device. Could you confirm me that Typescript sourcemaps work on real devices with Thanks Dan. Sorry to be negative but I thought it needed to be said and I would love to have your opinion on this. |
@jdat82 work in the desktop is more flexible and fastest way in most of cases |
@jdat82, Yes, source maps work on devices by default. If you do a Thanks, |
@beylkhanovdamir I agree with you but working faster is not the goal in itself. Our job is to deliver good mobile apps in production and I don't think working faster in your browser is helping reaching that goal. My purpose is to say that if they don't have time to focus on every thing they should target true device first. @danbucholtz I'm not building for production
|
I use
in package.json and PS: |
@jmesa-sistel Let me understand you debugging steps. |
@radrad |
@jmesa-sistel Ok it is clear what you meant. Thanks. |
Continue to get
|
Just a quick update re: Safari & Source Maps; oddly enough, after upgrading to the latest and greatest xCode release + ionic - the default setup with webpack now works fine. Since I haven't changed anything else, that's the only explanation I have, as all is good since. |
Don't write two or more classes in the same ts file. |
I encountered this issue tonight in Safari as well. My web app is not running correctly because Sarfi is looking for .map files and throwing 404's like crazy. What was the solution here? |
Short description of the problem:
With [email protected], source maps are not available for debugging in Chrome and Firefox.
What behavior are you expecting?
To see source .ts files for debugging.
Steps to reproduce:
3.Go to dev. tools -- no source map files are available. This was working fine prior to webpack installation. With version [email protected] source maps are available the right .ts files, but have null as content.
Which @ionic/app-scripts version are you using?
[email protected]
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
There was a previous issue listed here as closed with version [email protected], but I a getting this behavior with [email protected]
The text was updated successfully, but these errors were encountered: