Hi Josh,

thanks for the responses:

first, I try installing a Firefox VSCode debugger extension (Debugger for
Firefox 0.6.4 by Holger Benl) ...don't know if this is correct.
I add this in launch.json:

{
            "name": "Launch Firefox against debug.html, with sourcemaps",
            "type": "firefox",
            "request": "launch",
            "file": "${workspaceRoot}/debug.html",
            "sourceMaps": true,
            "preLaunchTask": "asconfigc"
        }

(but says sourceMaps line is not supported)

Anyway, selecting this config, firefox opens with the app running exactly
the same way as chrome, firefox stops not in Main but in a function called
by a click in a text. So, all the same as chrome.

For 3.- I changed to "config": "flex" and I get imports and extends working
properly :)
but adding js-output-type like this:

{
    "config": "flex",
    "compilerOptions": {
        "debug": true,
        "source-map": true*,*
*        "js-output-type": "flexjs"*
    },
    "files":
    [
        "src/Main.as"
    ]
}

causes this compilation error:

*command line*
*Error: unknown configuration variable 'source-map'.*


maybe is not correctly formulated?

Regarding Maven, I'm talking with Chris about the config of a test project
and I think I have to dig a bit more on this. I'll report If I investigate
and find something useful.

Thanks!



2016-09-27 19:36 GMT+02:00 Josh Tynjala <[email protected]>:

> Awesome. Thanks for the feedback, Carlos!
>
> In one of the browser debuggers (either Chrome or Firefox), I couldn't get
> a breakpoint to work in the constructor of the main class. Just like you
> describe. Strangely, the main class constructor worked in the other
> browser's debugger, and constructors from other classes were fine in both.
> Since I saw that you tried using VSCode's Chrome debugging extension, it
> must have been Firefox that worked properly with the main class
> constructor.
>
> I don't really know why this happens. I kind of wonder if the source map
> isn't fully loaded/parsed yet when the code starts running in Chrome. By
> the time the click listener is called, everything is finished initializing,
> I guess. That seemed like the most likely explanation to me.
>
> I think you can tell the debugger to pause immediately after starting, so
> you might give that a try. If it works, let me know and I can make a note
> of it somewhere.
>
> 1. This is correct. For the initial release, I focused on ActionScript
> only. MXML probably isn't trivial, but hopefully the most challenging parts
> of integrating with the compiler are already done, so it should be easier.
>
> 2. Only the main class for your app is all that's required in the "files"
> field of asconfig.json. All dependencies will be detected by the compiler.
> I just updated the description in the wiki to try to make that a little
> more clear. I'll get the description in the JSON schema updated too.
>
> A little background. In most cases, people pass only one class into mxmlc,
> but technically, it supports passing in multiple classes, with the final
> one being considered the entry point. I think other classes that are passed
> in are simply included, even if they aren't referenced. Probably so that
> they can be found by reflection or something.
>
> VSCode supports a similar tsconfig.json for TypeScript, and it also allows
> multiple files to be passed in (but it resolves dependencies too). To me,
> it made sense to allow multiple files, even if it isn't commonly used. I
> think this just needs clear documentation so that people understand that
> they don't need to include every class that they use. Just the main one,
> most of the time.
>
> 3. Which libraries from the SDK are included depends on which "config"
> value you set in your asconfig.json. You probably want "config": "flex",
> but there's one gotcha to watch out for. By default, both the extension and
> asconfigc consider "config": "flex" to be a SWF project for Flash Player.
> If you want to transpile to JS, and also use the FlexJS components, you'll
> also need to specify the "js-output-type" compiler option (the value should
> be "flexjs", I think?). This isn't ideal, but it's the best I could come up
> with because FlexJS doesn't have separate config files for JS and Flash
> Player (though, maybe it should...). I couldn't find a good way to do the
> opposite and make JS the default. I guess a new top-level field in
> asconfig.json could specify this, but I'm trying to keep extra
> configuration in asconfig.json that isn't a real compiler option to a
> minimum.
>
> 4. I'm not a Maven person. I would expect that you could set up Maven to
> run an executable like asconfigc. However, I suspect that's not considered
> the Maven way. Some kind of Maven plugin to parse asconfig.json and pass
> the right arguments to the compiler (which is basically how asconfigc
> works) might be closer to how a Maven person would expect this to work.
>
> asconfig.json follows the VSCode way of doing things. There is
> tsconfig.json for TypeScript and jsconfig.json for JavaScript. I wanted to
> follow the same pattern, if possible. I tried using the little-known trick
> where mxmlc will try to load a -config.xml file if it matches the main
> class file name (so for Main.as, it would try to load Main-config.xml, if
> it exists), but it couldn't configure everything.
>
> - Josh
>
> On Tue, Sep 27, 2016 at 9:28 AM, Carlos Rovira <[email protected]>
> wrote:
>
> > Hi Josh,
> >
> > at last I could get all up and running with Visual Code and your
> @NextGenAS
> > extension, building and debgugging in Chrome. Pretty Amazing work! :)
> >
> > (just one thing, the break point worked in a click function, but not in a
> > line of the main Main.as function, maybe source-maps doesn't work if the
> > breakpoint is in the constructor?)
> >
> > Right now I'm figuring where to go from here:
> >
> > 1.- I thing I read somewhere that MXML is not supported yet in VSCODE, is
> > this right?
> >
> > 2.- I must list all as files in asconfig.json? or we could give is a
> folder
> > (i.e: "src") ?
> >
> > 3.- I'm trying to make some basic import from org.apache but VSCode not
> > recognize them:
> >
> > package com.carlosrovira
> > {
> >
> >     import org.apache.flex.events.Event;         <-----------------this 2
> > imports are not found
> > import org.apache.flex.events.EventDispatcher;
> >
> > public class Component extends EventDispatcher.   <---and this extends
> > fails
> > {
> > public function Component()
> > {
> > }
> > }
> > }
> >
> >
> > 3.- I build flexJS with maven, and my plan is to use a pom.xml, but
> there's
> > a asconfig.json as well....maybe is too cumbersome to have 2 config
> > files....could this be integrated both?
> > (maybe there's some maven extension in vscode? that make it easy to run
> and
> > build...I'm too new to vscode yet! :))
> >
> > So far, as I said, amazing work! I think VSCode is now the best choice
> for
> > FlexJS development, not only for the fast progress, but for the
> > possibilities behind in few months.
> >
> > Hope you continue get donations to your work on Patreon.
> >
> > Best,
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
>



-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es


Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Reply via email to