You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Josh Tynjala <jo...@gmail.com> on 2016/04/13 16:42:14 UTC
How to use source maps. (was: how flexjs just get js-debug?)
I'm not done with source maps yet, but you should be able to start playing
around with them in their current state. Some lines may not allow
breakpoints right now, but browsers seem to move them to the next valid
line automatically.
Using source maps is pretty easy:
1. Add the --source-map compiler argument.
2. Run the js-debug version in your browser.
3. Open the browser's developer tools and find the debugger. It should
automatically map to the generated JavaScript to the original ActionScript
files.
4. Add breakpoints to your ActionScript!
Right now, source maps for MXML files are not supported. The compiler will
exit with an error. It should be possible to support it in the future, but
I'm focusing on pure ActionScript for now.
I tried getting the IntelliJ IDEA debugger working with source maps. It
recognizes them in other places, but breakpoints won't work. I think I've
figured out that ActionScript files have their own type of breakpoint in
IDEA that isn't recognized as a JavaScript breakpoint.
- Josh
On Apr 12, 2016 11:13 PM, "Harbs" <ha...@gmail.com> wrote:
Hi Lizhi,
I’m not sure what you are asking. Are you asking how to enable the source
debugging via the source maps which Josh is working on? If yes, I was
wondering the same thing. I’m not sure if it’s ready for use.
On Apr 13, 2016, at 8:38 AM, lizhi <sl...@qq.com> wrote:
>
>
>
>
> --
> View this message in context:
http://apache-flex-development.2333347.n4.nabble.com/how-flexjs-just-get-js-debug-tp52303.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by OmPrakash Muppirala <bi...@gmail.com>.
Sounds very cool, Josh! Thanks for getting this done.
On Wed, Apr 13, 2016 at 11:27 AM, Harbs <ha...@gmail.com> wrote:
> > Right now, source maps for MXML files are not supported. The compiler
> will
> > exit with an error. It should be possible to support it in the future,
> but
> > I'm focusing on pure ActionScript for now.
>
> So, a project with ANY mxml file cannot be used right now with the
> --source-map option?
>
> If so, I’ll have to wait to try it out.
>
> > I tried getting the IntelliJ IDEA debugger working with source maps. It
> > recognizes them in other places, but breakpoints won't work. I think I've
> > figured out that ActionScript files have their own type of breakpoint in
> > IDEA that isn't recognized as a JavaScript breakpoint.
>
> In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump
> on the band-wagon to get that working.
>
Yes, that would be so cool!
In the past, I had to open individual tickets to each IDE developer to get
their attention. I don't they are all paying close attention to this
mailing list.
Thanks,
Om
>
> I wonder how hard it would be to get that working in Visual Studio
> Code[1]. (In fact, I wonder about FlexJS integration in general.) It has
> support for in-IDE debugging of TypeScript and the whole IDE is open-source.
>
> [1]https://www.visualstudio.com/products/code-vs
>
>
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by Josh Tynjala <jo...@gmail.com>.
Yes, any MXML file will cause the --source-map argument to fail right now.
I'll try to get it to skip MXML files, as a temporary workaround.
I expect that it is possible to get debugging working in VS Code.
The Flash/Flex plugin for IntelliJ IDEA is also open source.
https://github.com/JetBrains/intellij-plugins/tree/master/flex
- Josh
On Apr 13, 2016 11:28 AM, "Harbs" <ha...@gmail.com> wrote:
> > Right now, source maps for MXML files are not supported. The compiler
> will
> > exit with an error. It should be possible to support it in the future,
> but
> > I'm focusing on pure ActionScript for now.
>
> So, a project with ANY mxml file cannot be used right now with the
> --source-map option?
>
> If so, I’ll have to wait to try it out.
>
> > I tried getting the IntelliJ IDEA debugger working with source maps. It
> > recognizes them in other places, but breakpoints won't work. I think I've
> > figured out that ActionScript files have their own type of breakpoint in
> > IDEA that isn't recognized as a JavaScript breakpoint.
>
> In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump
> on the band-wagon to get that working.
>
> I wonder how hard it would be to get that working in Visual Studio
> Code[1]. (In fact, I wonder about FlexJS integration in general.) It has
> support for in-IDE debugging of TypeScript and the whole IDE is open-source.
>
> [1]https://www.visualstudio.com/products/code-vs
>
>
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by Harbs <ha...@gmail.com>.
Nightly.
On Apr 14, 2016, at 5:53 PM, Carlos Rovira <ca...@codeoscopic.com> wrote:
> Hi Josh,
>
> in order to test source-maps, is that in official 0.6 release or I must use
> a nightly build?
>
> thanks
>
> 2016-04-14 0:34 GMT+02:00 Josh Tynjala <jo...@gmail.com>:
>
>> Hey Harbs,
>>
>> I tweaked the compiler so that a warning is printed to the console when
>> trying to use source maps with MXML, but it should work fine with any AS
>> files in the project.
>>
>> - Josh
>>
>> On Wed, Apr 13, 2016 at 11:27 AM, Harbs <ha...@gmail.com> wrote:
>>
>>>> Right now, source maps for MXML files are not supported. The compiler
>>> will
>>>> exit with an error. It should be possible to support it in the future,
>>> but
>>>> I'm focusing on pure ActionScript for now.
>>>
>>> So, a project with ANY mxml file cannot be used right now with the
>>> --source-map option?
>>>
>>> If so, I’ll have to wait to try it out.
>>>
>>>> I tried getting the IntelliJ IDEA debugger working with source maps. It
>>>> recognizes them in other places, but breakpoints won't work. I think
>> I've
>>>> figured out that ActionScript files have their own type of breakpoint
>> in
>>>> IDEA that isn't recognized as a JavaScript breakpoint.
>>>
>>> In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump
>>> on the band-wagon to get that working.
>>>
>>> I wonder how hard it would be to get that working in Visual Studio
>>> Code[1]. (In fact, I wonder about FlexJS integration in general.) It has
>>> support for in-IDE debugging of TypeScript and the whole IDE is
>> open-source.
>>>
>>> [1]https://www.visualstudio.com/products/code-vs
>>>
>>>
>>
>
>
>
> --
>
> 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.
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Josh,
in order to test source-maps, is that in official 0.6 release or I must use
a nightly build?
thanks
2016-04-14 0:34 GMT+02:00 Josh Tynjala <jo...@gmail.com>:
> Hey Harbs,
>
> I tweaked the compiler so that a warning is printed to the console when
> trying to use source maps with MXML, but it should work fine with any AS
> files in the project.
>
> - Josh
>
> On Wed, Apr 13, 2016 at 11:27 AM, Harbs <ha...@gmail.com> wrote:
>
> > > Right now, source maps for MXML files are not supported. The compiler
> > will
> > > exit with an error. It should be possible to support it in the future,
> > but
> > > I'm focusing on pure ActionScript for now.
> >
> > So, a project with ANY mxml file cannot be used right now with the
> > --source-map option?
> >
> > If so, I’ll have to wait to try it out.
> >
> > > I tried getting the IntelliJ IDEA debugger working with source maps. It
> > > recognizes them in other places, but breakpoints won't work. I think
> I've
> > > figured out that ActionScript files have their own type of breakpoint
> in
> > > IDEA that isn't recognized as a JavaScript breakpoint.
> >
> > In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump
> > on the band-wagon to get that working.
> >
> > I wonder how hard it would be to get that working in Visual Studio
> > Code[1]. (In fact, I wonder about FlexJS integration in general.) It has
> > support for in-IDE debugging of TypeScript and the whole IDE is
> open-source.
> >
> > [1]https://www.visualstudio.com/products/code-vs
> >
> >
>
--
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.
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by Josh Tynjala <jo...@gmail.com>.
Hey Harbs,
I tweaked the compiler so that a warning is printed to the console when
trying to use source maps with MXML, but it should work fine with any AS
files in the project.
- Josh
On Wed, Apr 13, 2016 at 11:27 AM, Harbs <ha...@gmail.com> wrote:
> > Right now, source maps for MXML files are not supported. The compiler
> will
> > exit with an error. It should be possible to support it in the future,
> but
> > I'm focusing on pure ActionScript for now.
>
> So, a project with ANY mxml file cannot be used right now with the
> --source-map option?
>
> If so, I’ll have to wait to try it out.
>
> > I tried getting the IntelliJ IDEA debugger working with source maps. It
> > recognizes them in other places, but breakpoints won't work. I think I've
> > figured out that ActionScript files have their own type of breakpoint in
> > IDEA that isn't recognized as a JavaScript breakpoint.
>
> In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump
> on the band-wagon to get that working.
>
> I wonder how hard it would be to get that working in Visual Studio
> Code[1]. (In fact, I wonder about FlexJS integration in general.) It has
> support for in-IDE debugging of TypeScript and the whole IDE is open-source.
>
> [1]https://www.visualstudio.com/products/code-vs
>
>
Re: How to use source maps. (was: how flexjs just get js-debug?)
Posted by Harbs <ha...@gmail.com>.
> Right now, source maps for MXML files are not supported. The compiler will
> exit with an error. It should be possible to support it in the future, but
> I'm focusing on pure ActionScript for now.
So, a project with ANY mxml file cannot be used right now with the --source-map option?
If so, I’ll have to wait to try it out.
> I tried getting the IntelliJ IDEA debugger working with source maps. It
> recognizes them in other places, but breakpoints won't work. I think I've
> figured out that ActionScript files have their own type of breakpoint in
> IDEA that isn't recognized as a JavaScript breakpoint.
In-IDE debugging would be REALLY cool. I hope some of the IDE folks jump on the band-wagon to get that working.
I wonder how hard it would be to get that working in Visual Studio Code[1]. (In fact, I wonder about FlexJS integration in general.) It has support for in-IDE debugging of TypeScript and the whole IDE is open-source.
[1]https://www.visualstudio.com/products/code-vs