You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2018/09/12 10:59:00 UTC

Re: Problem with Debugger in VSCode

Hi,

I want to test in a few hours debug in VSCode, I'm using as3&mxml
0.14.0-SNAPSHOT
Can someone confirm if this is working actually? or if I'll try it will not
work?

thanks!



El jue., 7 jun. 2018 a las 23:37, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Josh,
> I don't think break points are invalid. I think are recognized correctly.
> The only point is that debugger is not stopping at breakpoints. If I put a
> BP on a clickHandler, the method run with out stopping in the line.
> But the line shows a red dot showing right recognition (if not it will be
> grey outline right?)
>
> So what do think could be the problem?
>
> Thanks
>
> Carlos
>
>
> 2018-06-07 20:58 GMT+02:00 Josh Tynjala <jo...@apache.org>:
>
>> It is possible that a recent change made to the compiler has resulted in
>> invalid source map files. If they're not pointing to the correct locations
>> in any of the relevant files (.as, .mxml, or .js), that could explain why
>> the breakpoints aren't working. However, I wrote a number of automated
>> tests for the compiler to ensure that source maps are being generated
>> properly, so I would expect those tests to be failing if this was the issue.
>>
>> - Josh
>>
>> On 2018/06/07 08:20:49, Carlos Rovira <ca...@apache.org> wrote:
>> > Hi,
>> >
>> > something I saw from my old config launch.json file and the
>> instructions in
>> > Josh website is that we don't need in that file "sourceMaps": true
>> > Since I'm using maven always, I think for me the config is:
>> >
>> > <additionalCompilerOptions>-source-map=true</additionalCompilerOptions>
>> >
>> > This make the VSCode break points turn from outlined to red, and I think
>> > this means VSCode is recognizing the breakpoint.
>> >
>> > Then for me the problem is just one: why execution is not stopped in
>> that
>> > breakpoint? This was working many months ago (but config was different)
>> >
>> > I tried a a simple example with our helloworld app and put a click
>> handler
>> > to a simple function that only makes a trace("hello!"), and put a break
>> > point here.
>> >
>> > When I click hello world label, I get "hello!" in the VSCode console,
>> but
>> > debugger does not stop there.
>> >
>> > Chrome and Firefox seems to recognize the MXML code correctly and shows
>> > possible lines of debugging in black and the others in grey.
>> >
>> > So seems all is ok in both parts, but something is not working...maybe a
>> > VSCode bug? a NextGen Bug?
>> >
>> > I'll try to check if there's some bug about this and if I don't find
>> > nothing I'll open a VSCode issue.
>> >
>> > I think this is important since we loose debugging capabilities.... :(
>> >
>> > Thanks
>> >
>> >
>> >
>> > 2018-06-06 20:42 GMT+02:00 Carlos Rovira <ca...@apache.org>:
>> >
>> > > Hi,
>> > >
>> > > this was in my TODO, since I didn't use debug since many months ago. I
>> > > remember this was working when I tried it...I think when I started to
>> work
>> > > in making MDL, but I left totally (bad for me). I was trying and get
>> the
>> > > breakpoint marked as red, so the breakpoint is recognized, but
>> debugger
>> > > doesn't stop at all :(
>> > >
>> > > 2018-06-06 20:09 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:
>> > >
>> > >> Short of making it work in both SWF and JS, couldn't we just make it
>> work
>> > >> in JS by adding a "debugger" global variable to the JS typedefs?
>> Then it
>> > >> could be wrapped in COMPILE::JS blocks and used in Royale without
>> changing
>> > >> the compiler.
>> > >>
>> > >> Just wondering,
>> > >> -Alex
>> > >>
>> > >> On 6/6/18, 11:02 AM, "Josh Tynjala" <jo...@apache.org> wrote:
>> > >>
>> > >>     No, you can't use the debugger statement in ActionScript. I as
>> > >> documented, you can use a custom HTML template with your Royale app
>> and add
>> > >> it in a <script> element before the Royale code starts up.
>> > >>
>> > >>     It's worth mentioning that I created a branch to add support for
>> the
>> > >> debugger statement in ActionScript:
>> > >>
>> > >>     https://na01.safelinks.protection.outlook.com/?url=https%3A%
>> > >> 2F%2Fgithub.com%2Fapache%2Froyale-compiler%2Fcommits%
>> > >> 2Ffeature%2Fdebugger-statement&data=02%7C01%
>> > >> 7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa
>> > >> 7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639049541335043&
>> > >> sdata=5o0BcP4AJs9WJMxTDPkKYLaRok1LRfYxtyLr9RA6pFg%3D&reserved=0
>> > >>
>> > >>     However, there was opposition to merging it in because the SWF
>> > >> implementation would require calling an undocumented API to get Flash
>> > >> Player or AIR to pause in the debugger.
>> > >>
>> > >>     - Josh
>> > >>
>> > >>     On 2018/06/06 17:32:52, OmPrakash Muppirala <
>> bigosmallm@gmail.com>
>> > >> wrote:
>> > >>     > Curious if simply calling debugger; will help here?
>> > >>     >
>> > >>     > Will that statement crosscompile in Royale?
>> > >>     >
>> > >>     > Thanks,
>> > >>     > Om
>> > >>     >
>> > >>     >
>> > >>     > On Wed, Jun 6, 2018, 10:18 AM Josh Tynjala <
>> joshtynjala@apache.org>
>> > >> wrote:
>> > >>     >
>> > >>     > > You might be running into this issue (Debugger will not stop
>> at
>> > >>     > > breakpoints on startup with Apache Royale):
>> > >>     > >
>> > >>     > >
>> > >>     > > https://na01.safelinks.protection.outlook.com/?url=https%3A%
>> > >> 2F%2Fgithub.com%2FBowlerHatLLC%2Fvscode-nextgenas%2Fwiki%
>> > >> 2FCommon-issues%23debugger-will-not-stop-at-breakpoints-
>> > >> on-startup-with-apache-royale&data=02%7C01%7Caharui%40adobe.
>> > >> com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa7b1b5a7b34438794a
>> > >> ed2c178decee1%7C0%7C0%7C636639049541335043&sdata=ek90ekPWqhd
>> > >> 5EfIOHljWrq3Dw%2Fd8lNGo7VTBG7NSlus%3D&reserved=0
>> > >>     > >
>> > >>     > > It seems like VSCode can't connect with the browser's
>> debugger
>> > >> protocol
>> > >>     > > fast enough to register the breakpoint before the startup
>> code
>> > >> has already
>> > >>     > > finished running.
>> > >>     > >
>> > >>     > > A good way to check if you're running into this issue is to
>> add
>> > >> some kind
>> > >>     > > of click listener with a breakpoint. By the time you can
>> interact
>> > >> with the
>> > >>     > > app, the debugger should be fully connected.
>> > >>     > >
>> > >>     > > - Josh
>> > >>     > >
>> > >>     > > On 2018/06/05 19:50:40, Piotr Zarzycki <
>> piotrzarzycki21@gmail.com>
>> > >> wrote:
>> > >>     > > > Hi Guys,
>> > >>     > > >
>> > >>     > > > Does anyone who is using VSCode has problem with debugging
>> app?
>> > >> I've
>> > >>     > > > created Hello World app and tried to debug it but debugger
>> > >> cannot connect
>> > >>     > > > with app at all. When I hit Menu "Debug" -> "Start
>> Debugging" -
>> > >>     > > Application
>> > >>     > > > has been launched, but debugger seems to be dead, no stop
>> on
>> > >> breakpoints.
>> > >>     > > >
>> > >>     > > > My asconfig [1], launch.json [2]. I'm using JS only Nighly
>> > >> build of
>> > >>     > > Royale
>> > >>     > > > - I have just tested with build number #926.
>> > >>     > > >
>> > >>     > > > VSCode version: Version 1.23.1
>> > >>     > > > AS3 & MXML Engine: 0.12.0
>> > >>     > > >
>> > >>     > > > Anyone experience the same ? Or can check whether have the
>> same
>> > >> problem?
>> > >>     > > >
>> > >>     > > > [1] https://na01.safelinks.protect
>> > >> ion.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FulBB&
>> > >> data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5
>> > >> cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639
>> > >> 049541335043&sdata=5rmuDZWmShyGioM5zw8DonS1O9GUb6CylZ7PZBgEs
>> > >> AE%3D&reserved=0
>> > >>     > > > [2] https://na01.safelinks.protect
>> > >> ion.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fg8I5&
>> > >> data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5
>> > >> cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639
>> > >> 049541335043&sdata=2FALKUaqx7UqGViyAQfHI1Z%2FY2GMr3pzCRULyPN
>> > >> rEwM%3D&reserved=0
>> > >>     > > >
>> > >>     > > > Thanks,
>> > >>     > > > --
>> > >>     > > >
>> > >>     > > > Piotr Zarzycki
>> > >>     > > >
>> > >>     > > > Patreon: *https://na01.safelinks.protec
>> > >> tion.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiot
>> > >> rzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac846
>> > >> 9646d508d5cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> > >> 7C0%7C636639049541335043&sdata=NOIQg1XUq32ic48TBm0cVBd2
>> > >> 5wbh2uu2XBlE6zfFbDo%3D&reserved=0
>> > >>     > > > <https://na01.safelinks.protection.outlook.com/?url=https%
>> > >> 3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharu
>> > >> i%40adobe.com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa7b1b5a7
>> > >> b34438794aed2c178decee1%7C0%7C0%7C636639049541335043&
>> > >> sdata=NOIQg1XUq32ic48TBm0cVBd25wbh2uu2XBlE6zfFbDo%3D&reserved=0>*
>> > >>     > > >
>> > >>     > >
>> > >>     >
>> > >>
>> > >>
>> > >>
>> > >
>> > >
>> > > --
>> > > Carlos Rovira
>> > > http://about.me/carlosrovira
>> > >
>> > >
>> >
>> >
>> > --
>> > Carlos Rovira
>> > http://about.me/carlosrovira
>> >
>>
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Problem with Debugger in VSCode

Posted by Carlos Rovira <ca...@apache.org>.
Hi, I'm finding that debugger is working again, at least partially, I'll
explain.

Don't know if the problem was due to Chrome, to VSCode or something in
Royale. But now I can put break points in VSCode, launch in Chrome and stop
at break point.

I fixed an issue in compiler where MXML in sub packages was getting a
filename with the package in it, so this was bad constructed and those
files were not recognized.

Other Issue I found unsolved:  Seems MXML is not getting breakpoints right,
or at least not always. Sometimes I get a breakpoint in the right line,
other times, the line is not the right one and if I try other lines I get a
valid point of break and the compiler is capable to break at that point, so
I figure, source maps for MXML is not completely right. I think AS3 seems
correct for now, although I need to check a bit more.
For example, If I have comments in the AS3 source code this seems to not be
considered and so the line of code is not right.


El mié., 12 sept. 2018 a las 12:59, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi,
>
> I want to test in a few hours debug in VSCode, I'm using as3&mxml
> 0.14.0-SNAPSHOT
> Can someone confirm if this is working actually? or if I'll try it will
> not work?
>
> thanks!
>
>
>
> El jue., 7 jun. 2018 a las 23:37, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
>> Hi Josh,
>> I don't think break points are invalid. I think are recognized correctly.
>> The only point is that debugger is not stopping at breakpoints. If I put
>> a BP on a clickHandler, the method run with out stopping in the line.
>> But the line shows a red dot showing right recognition (if not it will be
>> grey outline right?)
>>
>> So what do think could be the problem?
>>
>> Thanks
>>
>> Carlos
>>
>>
>> 2018-06-07 20:58 GMT+02:00 Josh Tynjala <jo...@apache.org>:
>>
>>> It is possible that a recent change made to the compiler has resulted in
>>> invalid source map files. If they're not pointing to the correct locations
>>> in any of the relevant files (.as, .mxml, or .js), that could explain why
>>> the breakpoints aren't working. However, I wrote a number of automated
>>> tests for the compiler to ensure that source maps are being generated
>>> properly, so I would expect those tests to be failing if this was the issue.
>>>
>>> - Josh
>>>
>>> On 2018/06/07 08:20:49, Carlos Rovira <ca...@apache.org> wrote:
>>> > Hi,
>>> >
>>> > something I saw from my old config launch.json file and the
>>> instructions in
>>> > Josh website is that we don't need in that file "sourceMaps": true
>>> > Since I'm using maven always, I think for me the config is:
>>> >
>>> > <additionalCompilerOptions>-source-map=true</additionalCompilerOptions>
>>> >
>>> > This make the VSCode break points turn from outlined to red, and I
>>> think
>>> > this means VSCode is recognizing the breakpoint.
>>> >
>>> > Then for me the problem is just one: why execution is not stopped in
>>> that
>>> > breakpoint? This was working many months ago (but config was different)
>>> >
>>> > I tried a a simple example with our helloworld app and put a click
>>> handler
>>> > to a simple function that only makes a trace("hello!"), and put a break
>>> > point here.
>>> >
>>> > When I click hello world label, I get "hello!" in the VSCode console,
>>> but
>>> > debugger does not stop there.
>>> >
>>> > Chrome and Firefox seems to recognize the MXML code correctly and shows
>>> > possible lines of debugging in black and the others in grey.
>>> >
>>> > So seems all is ok in both parts, but something is not working...maybe
>>> a
>>> > VSCode bug? a NextGen Bug?
>>> >
>>> > I'll try to check if there's some bug about this and if I don't find
>>> > nothing I'll open a VSCode issue.
>>> >
>>> > I think this is important since we loose debugging capabilities.... :(
>>> >
>>> > Thanks
>>> >
>>> >
>>> >
>>> > 2018-06-06 20:42 GMT+02:00 Carlos Rovira <ca...@apache.org>:
>>> >
>>> > > Hi,
>>> > >
>>> > > this was in my TODO, since I didn't use debug since many months ago.
>>> I
>>> > > remember this was working when I tried it...I think when I started
>>> to work
>>> > > in making MDL, but I left totally (bad for me). I was trying and get
>>> the
>>> > > breakpoint marked as red, so the breakpoint is recognized, but
>>> debugger
>>> > > doesn't stop at all :(
>>> > >
>>> > > 2018-06-06 20:09 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:
>>> > >
>>> > >> Short of making it work in both SWF and JS, couldn't we just make
>>> it work
>>> > >> in JS by adding a "debugger" global variable to the JS typedefs?
>>> Then it
>>> > >> could be wrapped in COMPILE::JS blocks and used in Royale without
>>> changing
>>> > >> the compiler.
>>> > >>
>>> > >> Just wondering,
>>> > >> -Alex
>>> > >>
>>> > >> On 6/6/18, 11:02 AM, "Josh Tynjala" <jo...@apache.org>
>>> wrote:
>>> > >>
>>> > >>     No, you can't use the debugger statement in ActionScript. I as
>>> > >> documented, you can use a custom HTML template with your Royale app
>>> and add
>>> > >> it in a <script> element before the Royale code starts up.
>>> > >>
>>> > >>     It's worth mentioning that I created a branch to add support
>>> for the
>>> > >> debugger statement in ActionScript:
>>> > >>
>>> > >>     https://na01.safelinks.protection.outlook.com/?url=https%3A%
>>> > >> 2F%2Fgithub.com%2Fapache%2Froyale-compiler%2Fcommits%
>>> > >> 2Ffeature%2Fdebugger-statement&data=02%7C01%
>>> > >> 7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa
>>> > >> 7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639049541335043&
>>> > >> sdata=5o0BcP4AJs9WJMxTDPkKYLaRok1LRfYxtyLr9RA6pFg%3D&reserved=0
>>> > >>
>>> > >>     However, there was opposition to merging it in because the SWF
>>> > >> implementation would require calling an undocumented API to get
>>> Flash
>>> > >> Player or AIR to pause in the debugger.
>>> > >>
>>> > >>     - Josh
>>> > >>
>>> > >>     On 2018/06/06 17:32:52, OmPrakash Muppirala <
>>> bigosmallm@gmail.com>
>>> > >> wrote:
>>> > >>     > Curious if simply calling debugger; will help here?
>>> > >>     >
>>> > >>     > Will that statement crosscompile in Royale?
>>> > >>     >
>>> > >>     > Thanks,
>>> > >>     > Om
>>> > >>     >
>>> > >>     >
>>> > >>     > On Wed, Jun 6, 2018, 10:18 AM Josh Tynjala <
>>> joshtynjala@apache.org>
>>> > >> wrote:
>>> > >>     >
>>> > >>     > > You might be running into this issue (Debugger will not
>>> stop at
>>> > >>     > > breakpoints on startup with Apache Royale):
>>> > >>     > >
>>> > >>     > >
>>> > >>     > >
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%
>>> > >> 2F%2Fgithub.com%2FBowlerHatLLC%2Fvscode-nextgenas%2Fwiki%
>>> > >> 2FCommon-issues%23debugger-will-not-stop-at-breakpoints-
>>> > >> on-startup-with-apache-royale&data=02%7C01%7Caharui%40adobe.
>>> > >> com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa7b1b5a7b34438794a
>>> > >> ed2c178decee1%7C0%7C0%7C636639049541335043&sdata=ek90ekPWqhd
>>> > >> 5EfIOHljWrq3Dw%2Fd8lNGo7VTBG7NSlus%3D&reserved=0
>>> > >>     > >
>>> > >>     > > It seems like VSCode can't connect with the browser's
>>> debugger
>>> > >> protocol
>>> > >>     > > fast enough to register the breakpoint before the startup
>>> code
>>> > >> has already
>>> > >>     > > finished running.
>>> > >>     > >
>>> > >>     > > A good way to check if you're running into this issue is to
>>> add
>>> > >> some kind
>>> > >>     > > of click listener with a breakpoint. By the time you can
>>> interact
>>> > >> with the
>>> > >>     > > app, the debugger should be fully connected.
>>> > >>     > >
>>> > >>     > > - Josh
>>> > >>     > >
>>> > >>     > > On 2018/06/05 19:50:40, Piotr Zarzycki <
>>> piotrzarzycki21@gmail.com>
>>> > >> wrote:
>>> > >>     > > > Hi Guys,
>>> > >>     > > >
>>> > >>     > > > Does anyone who is using VSCode has problem with
>>> debugging app?
>>> > >> I've
>>> > >>     > > > created Hello World app and tried to debug it but debugger
>>> > >> cannot connect
>>> > >>     > > > with app at all. When I hit Menu "Debug" -> "Start
>>> Debugging" -
>>> > >>     > > Application
>>> > >>     > > > has been launched, but debugger seems to be dead, no stop
>>> on
>>> > >> breakpoints.
>>> > >>     > > >
>>> > >>     > > > My asconfig [1], launch.json [2]. I'm using JS only Nighly
>>> > >> build of
>>> > >>     > > Royale
>>> > >>     > > > - I have just tested with build number #926.
>>> > >>     > > >
>>> > >>     > > > VSCode version: Version 1.23.1
>>> > >>     > > > AS3 & MXML Engine: 0.12.0
>>> > >>     > > >
>>> > >>     > > > Anyone experience the same ? Or can check whether have
>>> the same
>>> > >> problem?
>>> > >>     > > >
>>> > >>     > > > [1] https://na01.safelinks.protect
>>> > >> ion.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FulBB&
>>> > >> data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5
>>> > >> cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639
>>> > >> 049541335043&sdata=5rmuDZWmShyGioM5zw8DonS1O9GUb6CylZ7PZBgEs
>>> > >> AE%3D&reserved=0
>>> > >>     > > > [2] https://na01.safelinks.protect
>>> > >> ion.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fg8I5&
>>> > >> data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac8469646d508d5
>>> > >> cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636639
>>> > >> 049541335043&sdata=2FALKUaqx7UqGViyAQfHI1Z%2FY2GMr3pzCRULyPN
>>> > >> rEwM%3D&reserved=0
>>> > >>     > > >
>>> > >>     > > > Thanks,
>>> > >>     > > > --
>>> > >>     > > >
>>> > >>     > > > Piotr Zarzycki
>>> > >>     > > >
>>> > >>     > > > Patreon: *https://na01.safelinks.protec
>>> > >> tion.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiot
>>> > >> rzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ca4c16903fac846
>>> > >> 9646d508d5cbd7ad0e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> > >> 7C0%7C636639049541335043&sdata=NOIQg1XUq32ic48TBm0cVBd2
>>> > >> 5wbh2uu2XBlE6zfFbDo%3D&reserved=0
>>> > >>     > > > <
>>> https://na01.safelinks.protection.outlook.com/?url=https%
>>> > >> 3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharu
>>> > >> i%40adobe.com%7Ca4c16903fac8469646d508d5cbd7ad0e%7Cfa7b1b5a7
>>> > >> b34438794aed2c178decee1%7C0%7C0%7C636639049541335043&
>>> > >> sdata=NOIQg1XUq32ic48TBm0cVBd25wbh2uu2XBlE6zfFbDo%3D&reserved=0>*
>>> > >>     > > >
>>> > >>     > >
>>> > >>     >
>>> > >>
>>> > >>
>>> > >>
>>> > >
>>> > >
>>> > > --
>>> > > Carlos Rovira
>>> > > http://about.me/carlosrovira
>>> > >
>>> > >
>>> >
>>> >
>>> > --
>>> > Carlos Rovira
>>> > http://about.me/carlosrovira
>>> >
>>>
>>
>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira