Changing the subject… Here’s a real-life scenario which I’m not sure how it’s going to work:
I expect to spend the next many months building a JS version of my PrintUI WYSIWYG web app. Many parts of the the code maps pretty well to JS, especially when using EaselJS. However, I think it’s unreasonable to expect that the app can be compiled to both a Flash target as well as a JS one for the following reasons (and probably more). 1) EaselJS is not a 1-to-1 mapping to the Flash drawing APIs. It’s similar, but there’s enough differences that I don’t see how to target both. Maybe we can build some kind of class which handles conditionals and edge cases. I don’t know. 2) I’m not sure how targeting API requests will work with both targets. I have to handle custom response codes and the like which required building some custom classes which acted as a proxy for the URLLoaders. 3) There’s lots of XML processing needed. I’m not sure how to handle the XML processing in a multi-target way. 4) The biggest kicker is text editing. I’m going to have to do a LOT of work getting text to render exactly in the HTML. I’m likely going to use txtjs to help, but that’s really only a start. Besides the actual text problem, trying to target both Flash and HTML seems like a total nightmare. Am I missing something, or will this require browser debugging? Here’s my question: Jetbrains seems to have worked out integrated debugging of JS[1]. If I understand correctly, the Falcon compiler has symbols that map the code. Is there any way of mapping the ActionScript code to the compiled JS code, so it’s possible to maintain links between the code similar to how debugging works with ABC code and ActionScript? Or is what I’m suggesting completely non-sensical? I think having a really smooth debug experience on the JS side will help immeasurably in terms of FlexJS adoption. [1]https://www.jetbrains.com/webstorm/features/ On Oct 21, 2015, at 9:50 AM, Alex Harui <aha...@adobe.com> wrote: >> 2) How does debugging work? Assuming you are targeting only JS, is it >> necessary to debug in the compiled JS in the browser or is it possible to >> debug in the source code somehow using code mapping? >> > > Well, my vision for FlexJS was that folks would build a SWF and debug the > SWF since, IMO, there are better debugging tools in Flash Builder, and the > Flash runtime will catch errors that the JS runtime will not. There would > still be times when you have to debug the JS and if the error reproduces > in the bin/js-debug version then you can use whatever JS debugger you > want. If the error only reproduces in the bin/js-release version, then > yes, you have to try debugging with the source maps. I’ve found debugging > the js-release version to be painful even with source maps, especially > when minification is on.