You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "paulo.campos1" <pa...@pictengine.com> on 2014/04/26 16:26:35 UTC

[FlexJS] adt.jar not found on FlexJS SDK

Hi. After installation of FlexJs through the new 3.0 intaller, i am following
this 
"https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+Flash+Builder"
post to try this new  baby. When i try to add flexJS SDK in Flash Builder
4.7, i get the following error.
"adt.jar not found in classpath of .... " I am on win7 machine. Am i doing
something wrong?






--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-found-on-FlexJS-SDK-tp37266.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] adt.jar not found on FlexJS SDK

Posted by Alex Harui <ah...@adobe.com>.
That usually means a bad download is cached.  AIR uses the browser caches
so flush those.  If you've set up the installer cache, look in there as
well.

On 4/27/14 8:00 AM, "paulo.campos1" <pa...@pictengine.com> wrote:

>Only work when i choose FlexJS0.01 in conjunction with air 13 beta.
>Maybe is something wrong with my machine. Anyway now FB 4.7 recognizes the
>installation folder as a valid SDK folder.
>
>
>2014-04-27 1:43 GMT+01:00 Alex Harui [via Apache Flex Development] <
>ml-node+s2333347n37287h96@n4.nabble.com>:
>
>> Yes, and don't close the installer until you've checked to see if it
>> worked.  Post the log from the installer if there are still problems.
>>
>> -Alex
>>
>> On 4/26/14 9:42 AM, "paulo.campos1" <[hidden
>>email]<http://user/SendEmail.jtp?type=node&node=37287&i=0>>
>> wrote:
>>
>> >Hi Alex.
>> >Thanks for the reply.
>> >
>> >No. there isn´t any adt.jar on my instalation. Should i try to re
>> install?
>> >
>> >
>> >2014-04-26 16:15 GMT+01:00 Alex Harui [via Apache Flex Development] <
>> >[hidden email] <http://user/SendEmail.jtp?type=node&node=37287&i=1>>:
>> >
>> >>
>> >>
>> >> On 4/26/14 7:26 AM, "paulo.campos1" <[hidden
>> >>email]<http://user/SendEmail.jtp?type=node&node=37268&i=0>>
>> >> wrote:
>> >>
>> >> >Hi. After installation of FlexJs through the new 3.0 intaller, i am
>> >> >following
>> >> >this
>> >> >"
>> >>
>> >>
>> 
>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>> >> >Flash+Builder"
>> >> >post to try this new  baby. When i try to add flexJS SDK in Flash
>> >>Builder
>> >> >4.7, i get the following error.
>> >> >"adt.jar not found in classpath of .... " I am on win7 machine. Am i
>> >> doing
>> >> >something wrong?
>> >> >
>> >> Hmm.  Is there an adt.jar in the lib folder of your FlexJS SDK?
>> >>Sometimes
>> >> there can be a problem with the AIR SDK download.
>> >>
>> >> Thanks,
>> >> -Alex
>> >>
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> >>discussion
>> >> below:
>> >>
>> >>
>> >>
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-f
>> >>ound-on-FlexJS-SDK-tp37266p37268.html
>> >>  To start a new topic under Apache Flex Development, email
>> >> [hidden email] <http://user/SendEmail.jtp?type=node&node=37287&i=2>
>> >> To unsubscribe from Apache Flex Development, click
>> >>here<
>>
>> >>mdpbmUuY29tfDF8LTQwNDQxODkwMw==>
>> >> .
>> >>
>> 
>>>>NAML<<http://apache-flex-development.2333347.n4.nabble.com/template/Nam
>>>>lSe>
>> http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
>> 
>>>>rvlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base
>>>>=n
>>
>> 
>>>>abble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNam
>>>>es
>>
>> 
>>>>pace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscrib
>>>>er
>>
>> 
>>>>s%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_insta
>>>>nt
>>
>> >>_email%21nabble%3Aemail.naml>
>> >>
>> >
>> >
>> >
>> >
>> >--
>> >View this message in context:
>> >
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-f
>>o
>> >und-on-FlexJS-SDK-tp37266p37271.html
>> >Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>>discussion
>> below:
>>
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-f
>>ound-on-FlexJS-SDK-tp37266p37287.html
>>  To start a new topic under Apache Flex Development, email
>> ml-node+s2333347n1h30@n4.nabble.com
>> To unsubscribe from Apache Flex Development, click
>>here<http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
>>rvlet.jtp?macro=unsubscribe_by_code&node=1&code=cGF1bG8uY2FtcG9zQHBpY3Rlb
>>mdpbmUuY29tfDF8LTQwNDQxODkwMw==>
>> .
>> 
>>NAML<http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
>>rvlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=n
>>abble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNames
>>pace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscriber
>>s%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant
>>_email%21nabble%3Aemail.naml>
>>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-fo
>und-on-FlexJS-SDK-tp37266p37293.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] adt.jar not found on FlexJS SDK

Posted by "paulo.campos1" <pa...@pictengine.com>.
Only work when i choose FlexJS0.01 in conjunction with air 13 beta.
Maybe is something wrong with my machine. Anyway now FB 4.7 recognizes the
installation folder as a valid SDK folder.


2014-04-27 1:43 GMT+01:00 Alex Harui [via Apache Flex Development] <
ml-node+s2333347n37287h96@n4.nabble.com>:

> Yes, and don't close the installer until you've checked to see if it
> worked.  Post the log from the installer if there are still problems.
>
> -Alex
>
> On 4/26/14 9:42 AM, "paulo.campos1" <[hidden email]<http://user/SendEmail.jtp?type=node&node=37287&i=0>>
> wrote:
>
> >Hi Alex.
> >Thanks for the reply.
> >
> >No. there isn´t any adt.jar on my instalation. Should i try to re
> install?
> >
> >
> >2014-04-26 16:15 GMT+01:00 Alex Harui [via Apache Flex Development] <
> >[hidden email] <http://user/SendEmail.jtp?type=node&node=37287&i=1>>:
> >
> >>
> >>
> >> On 4/26/14 7:26 AM, "paulo.campos1" <[hidden
> >>email]<http://user/SendEmail.jtp?type=node&node=37268&i=0>>
> >> wrote:
> >>
> >> >Hi. After installation of FlexJs through the new 3.0 intaller, i am
> >> >following
> >> >this
> >> >"
> >>
> >>
> https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
> >> >Flash+Builder"
> >> >post to try this new  baby. When i try to add flexJS SDK in Flash
> >>Builder
> >> >4.7, i get the following error.
> >> >"adt.jar not found in classpath of .... " I am on win7 machine. Am i
> >> doing
> >> >something wrong?
> >> >
> >> Hmm.  Is there an adt.jar in the lib folder of your FlexJS SDK?
> >>Sometimes
> >> there can be a problem with the AIR SDK download.
> >>
> >> Thanks,
> >> -Alex
> >>
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> >>discussion
> >> below:
> >>
> >>
> >>
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-f
> >>ound-on-FlexJS-SDK-tp37266p37268.html
> >>  To start a new topic under Apache Flex Development, email
> >> [hidden email] <http://user/SendEmail.jtp?type=node&node=37287&i=2>
> >> To unsubscribe from Apache Flex Development, click
> >>here<
>
> >>mdpbmUuY29tfDF8LTQwNDQxODkwMw==>
> >> .
> >>
> >>NAML<<http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe>
> http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
> >>rvlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=n
>
> >>abble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNames
>
> >>pace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscriber
>
> >>s%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant
>
> >>_email%21nabble%3Aemail.naml>
> >>
> >
> >
> >
> >
> >--
> >View this message in context:
> >
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-fo
> >und-on-FlexJS-SDK-tp37266p37271.html
> >Sent from the Apache Flex Development mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-found-on-FlexJS-SDK-tp37266p37287.html
>  To start a new topic under Apache Flex Development, email
> ml-node+s2333347n1h30@n4.nabble.com
> To unsubscribe from Apache Flex Development, click here<http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cGF1bG8uY2FtcG9zQHBpY3RlbmdpbmUuY29tfDF8LTQwNDQxODkwMw==>
> .
> NAML<http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-found-on-FlexJS-SDK-tp37266p37293.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] adt.jar not found on FlexJS SDK

Posted by Alex Harui <ah...@adobe.com>.
Yes, and don't close the installer until you've checked to see if it
worked.  Post the log from the installer if there are still problems.

-Alex

On 4/26/14 9:42 AM, "paulo.campos1" <pa...@pictengine.com> wrote:

>Hi Alex.
>Thanks for the reply.
>
>No. there isn´t any adt.jar on my instalation. Should i try to re install?
>
>
>2014-04-26 16:15 GMT+01:00 Alex Harui [via Apache Flex Development] <
>ml-node+s2333347n37268h7@n4.nabble.com>:
>
>>
>>
>> On 4/26/14 7:26 AM, "paulo.campos1" <[hidden
>>email]<http://user/SendEmail.jtp?type=node&node=37268&i=0>>
>> wrote:
>>
>> >Hi. After installation of FlexJs through the new 3.0 intaller, i am
>> >following
>> >this
>> >"
>> 
>>https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>> >Flash+Builder"
>> >post to try this new  baby. When i try to add flexJS SDK in Flash
>>Builder
>> >4.7, i get the following error.
>> >"adt.jar not found in classpath of .... " I am on win7 machine. Am i
>> doing
>> >something wrong?
>> >
>> Hmm.  Is there an adt.jar in the lib folder of your FlexJS SDK?
>>Sometimes
>> there can be a problem with the AIR SDK download.
>>
>> Thanks,
>> -Alex
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>>discussion
>> below:
>>
>> 
>>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-f
>>ound-on-FlexJS-SDK-tp37266p37268.html
>>  To start a new topic under Apache Flex Development, email
>> ml-node+s2333347n1h30@n4.nabble.com
>> To unsubscribe from Apache Flex Development, click
>>here<http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
>>rvlet.jtp?macro=unsubscribe_by_code&node=1&code=cGF1bG8uY2FtcG9zQHBpY3Rlb
>>mdpbmUuY29tfDF8LTQwNDQxODkwMw==>
>> .
>> 
>>NAML<http://apache-flex-development.2333347.n4.nabble.com/template/NamlSe
>>rvlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=n
>>abble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNames
>>pace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscriber
>>s%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant
>>_email%21nabble%3Aemail.naml>
>>
>
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-fo
>und-on-FlexJS-SDK-tp37266p37271.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
Awesome!

On 4/26/14 5:01 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Hi,
>
>To resume a bit what I did and discover today:
>
>1- I merged the donated code to the the current FDB, keeping the existing
>fixes and the current ExpressionEvaluator (I guess It is possible to use
>the new Falcon based implementation modifying the ANT script which builds
>it, in order to link the Falcon sources).
>
>2- The new commands are "worker <workerID>" used to select a parlicular
>worker by its ID and "info workers", this is an example of what gives a
>break inside a worker and what displays the 2 commands :
>
>(fdb) info workers
>!mainThread! 0 - !workerRunning!
>!inWorker! {worker=1} - !workerSuspended! !workerSelected!
>
>(fdb) worker 0
>!workerChanged! !mainThread!
>
>(fdb) info workers
>!mainThread! 0 - !workerRunning! !workerSelected!
>!inWorker! {worker=1} - !workerSuspended!
>
>(fdb) worker 1
>!workerChanged! 1
>
>(fdb) info workers
>!mainThread! 0 - !workerRunning!
>!inWorker! {worker=1} - !workerSuspended! !workerSelected!
>
>Note for IDE integration:
>
>1- At the moment, watch, displays and breakpoints are set for 1
>particular worker, it means, they need to be defined again when a worker
>starts.
>2- "info breakpoints" does well display the breakpoints for the same line
>and on different worker of the same class but without the relative worker
>ID (I guess it could be easily fixed)
>
>I'll be back on it on Monday.
>
>Frédéric THOMAS 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Done !! :-)

Thanks,
Frédéric THOMAS

> Date: Tue, 29 Apr 2014 19:03:39 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> Yes, I'd gladly try it. We can switch to personal emails in order not to 
> spam the list.
> 
> On 29.04.2014 18:34, Frédéric THOMAS wrote:
> > Hi Alexander,
> >
> > I downloaded the files you indicated me + some missing files (UI, ShineMP3, metallica.wav), created an IntelliJ project, build and run successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my version of FDB and was unable to reproduce both of the issues, it worked as expected, so, that's a good news.
> >
> > Also, not on this test app but on another one [1], I've been able to set a BP on the worker using IntelliJ once the worker has been loaded but the variables was not readable and futur stops to the BP didn't work, IJ shows up the SystemManager class instead.
> >
> > If you are interested to test my version, just tell me and I will send it to you.
> >
> > Unfortunately, I haven't been able to work on it yesterday but will continue tonight.
> >
> > Frédéric THOMAS
> >
> > [1] https://github.com/doublefx/downloadFileWorker
> >
> >
> >> Date: Tue, 29 Apr 2014 15:25:23 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: [FDB] Integration
> >>
> >> Hi Frédéric,
> >> that's great that you are ready to put the effort into fdb with workers
> >> support!
> >>
> >> I have to say that IntelliJ IDEA still doesn't support debugging apps
> >> with workers. I spent some time on it but faced some bugs in fdb that
> >> were not that easy to workaround. That's not an excuse for me and I hope
> >> to finally support workers debug in the next version. Luckily fdb is not
> >> a black box for me any more.
> >>
> >> Below are some of the bugs that I faced. I played with this project:
> >> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains
> >> already compiled MP3Worker.swf which is the main app.
> >>
> >> 1. When the worker is loaded it is impossible to switch to main thread
> >> using 'worker 0' command. Fdb says that active worker has changed but
> >> asking 'info workers' again says that actually it hasn't. See listing [1].
> >>
> >> 2. More important bug for the IDE integration is inability to set
> >> breakpoint without knowing file id. Files that belong to different
> >> workers may have the same id. When I ask to set a breakpoint in a file
> >> with given name but current active worker doesn't have file with this
> >> name then fdb sets the breakpoint inside completely different file that
> >> does belong to the current worker and has the same id as the file where
> >> I asked to set breakpoint. See listing [2].
> >>
> >> Alexander
> >>
> >> [1]
> >>
> >> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
> >> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar "C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
> >> Adobe fdb (Flash Player Debugger) [build development]
> >> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> >> (fdb) run
> >> Waiting for Player to connect
> >> Player connected; session starting.
> >> Set breakpoints and then type 'continue' to resume the session.
> >> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 bytes after decompression
> >> (fdb) c
> >> [WorkerCreate] 1
> >> Additional ActionScript code has been loaded from a SWF or a frame.
> >> To see all currently loaded files, type 'info files'.
> >> Active worker has changed to worker 1
> >> Set additional breakpoints as desired, and then type 'continue'.
> >> (fdb) info workers
> >> Main Thread 0 - Running
> >> Worker 1 - Suspended (Active)
> >> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 bytes after decompression
> >> Set additional breakpoints as desired, and then type 'continue'.
> >> (fdb) worker 0
> >> *Active worker has changed to worker Main Thread*
> >> Set additional breakpoints as desired, and then type 'continue'.
> >> (fdb) info workers
> >> *Main Thread 0 - Running*
> >> *Worker 1 - Suspended (Active)**
> >> *Set additional breakpoints as desired, and then type 'continue'.
> >> (fdb)
> >>
> >> [2]
> >>
> >> ...
> >> (fdb) info workers
> >> Main Thread 0 - Suspended (Active)
> >> Worker 1 - Suspended
> >> (fdb) show files
> >> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
> >> 2 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
> >> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
> >> 2 /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, ShineMP3Encoder.as (Worker 1)
> >> *(fdb) break BackWorker.as:26**
> >> **Breakpoint 2: file MP3Worker.as, line 26**
> >> *(fdb)
> >>
> >>
> >> On 27.04.2014 4:01, Frédéric THOMAS wrote:
> >>> Hi,
> >>>
> >>> To resume a bit what I did and discover today:
> >>>
> >>> 1- I merged the donated code to the the current FDB, keeping the existing fixes and the current ExpressionEvaluator (I guess It is possible to use the new Falcon based implementation modifying the ANT script which builds it, in order to link the Falcon sources).
> >>>
> >>> 2- The new commands are "worker <workerID>" used to select a parlicular worker by its ID and "info workers", this is an example of what gives a break inside a worker and what displays the 2 commands :
> >>>
> >>> (fdb) info workers
> >>> !mainThread! 0 - !workerRunning!
> >>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >>>
> >>> (fdb) worker 0
> >>> !workerChanged! !mainThread!
> >>>
> >>> (fdb) info workers
> >>> !mainThread! 0 - !workerRunning! !workerSelected!
> >>> !inWorker! {worker=1} - !workerSuspended!
> >>>
> >>> (fdb) worker 1
> >>> !workerChanged! 1
> >>>
> >>> (fdb) info workers
> >>> !mainThread! 0 - !workerRunning!
> >>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >>>
> >>> Note for IDE integration:
> >>>
> >>> 1- At the moment, watch, displays and breakpoints are set for 1 particular worker, it means, they need to be defined again when a worker starts.
> >>> 2- "info breakpoints" does well display the breakpoints for the same line and on different worker of the same class but without the relative worker ID (I guess it could be easily fixed)
> >>>
> >>> I'll be back on it on Monday.
> >>>
> >>> Frédéric THOMAS 		 	   		
> >   		 	   		
> 
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.


Just forgot to mention that in case of ambiguous partial file name 
passed to the break / clear command, FDB doesn't do anything but print 
an ambiguous files warning.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 29 May 2014 08:50:12 +0100
> 
> > > AIR users will still have to use the DebuggableWorker class as base 
> > > class for their workers and the main app as well though. 
> > I'm not sure we can convince all developers to rewrite their workers, 
> > but I hope no fatal error happens if fdb fails to suspend worker.
> 
> FDB not being able to halt the player, won't IntelliJ hang up in that case ?
> 
> > - I have to suspend at least one worker to be able to send 'break' 
> > command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> > at the end all workers are in the same state as before break command
> > - the same about 'delete' command.
> 
> Correct.
> Note: For the "delete" command, you can now delete unresolved BP, that wasn't the case before.
> 
> > - when breakpoint is hit, only one worker is paused.
> 
> Not correct, look at the debugTickler() at DebuggableWorker.as:56, if I set a BP there and somewhere else in another worker and this last one is hited first, it doesn't mean that the first one won't be hited in between, 2 workers can then be in suspend mode because I received 2 break events even though FDB will process them one at time.
> 
> > I have one more request for the IDE integration. Using part of file name 
> > in 'break' command is dangerous, more than one file may match. Even 
> > using full file name is not strict enough: we have a lot of users who 
> > had the same-named files in different packages. Currently IntelliJ IDEA 
> > tries to use file id instead of file name whenever possible, but with 
> > your fixes I start thinking about a different approach. Will it be easy 
> > to support relative path in 'break' command syntax? In this case I'll be 
> > sending path relative to src root, e.g. 'break 
> > flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> > known file paths as I'd like to always pass '/' whereas paths returned 
> > by Flash Player may contain '\'.
> 
> Ok, implemented, will commit today, you can now do:
> 
> break mx\core\DebuggableWorker.as:56
> or
> break mx/core/DebuggableWorker.as:56
> 
> > > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > > what is done for Java and adding a combobox to access threads on top 
> > > of the Frame list ?
> > Shouldn't be extremely hard.
> 
> Can't wait to see that :-)
> 
> Thanks,
> Frédéric THOMAS
> 
> > Date: Wed, 28 May 2014 22:19:10 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > On 28.05.2014 16:06, Frédéric THOMAS wrote:
> > > AIR users will still have to use the DebuggableWorker class as base 
> > > class for their workers and the main app as well though. 
> > I'm not sure we can convince all developers to rewrite their workers, 
> > but I hope no fatal error happens if fdb fails to suspend worker.
> > > I had no problems using it with IntelliJ, waiting for more tests / 
> > > feedback from you though :-) 
> > It really seems to work! Please check if I get all correctly:
> > - I have to suspend at least one worker to be able to send 'break' 
> > command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> > at the end all workers are in the same state as before break command
> > - the same about 'delete' command.
> > - when breakpoint is hit, only one worker is paused.
> > 
> > I have one more request for the IDE integration. Using part of file name 
> > in 'break' command is dangerous, more than one file may match. Even 
> > using full file name is not strict enough: we have a lot of users who 
> > had the same-named files in different packages. Currently IntelliJ IDEA 
> > tries to use file id instead of file name whenever possible, but with 
> > your fixes I start thinking about a different approach. Will it be easy 
> > to support relative path in 'break' command syntax? In this case I'll be 
> > sending path relative to src root, e.g. 'break 
> > flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> > known file paths as I'd like to always pass '/' whereas paths returned 
> > by Flash Player may contain '\'.
> > > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > > what is done for Java and adding a combobox to access threads on top 
> > > of the Frame list ?
> > Shouldn't be extremely hard.
> > 
> > Alex
>  		 	   		  

 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Works perfectly now, thanks for the fix!

On 30.05.2014 15:07, Frédéric THOMAS wrote:
> @Alexander
>
> Fixed: https://issues.apache.org/jira/browse/FLEX-34346 (the compiled FDB attached)
>
> In a mxml file, when a inline item renderer is defined, a file id is added to the file list of the SWF linking the source of this file, 1 per item renderer + the class itself, the fix says if the path of the source file is found more than once, consider that's the same one.
>
> Not sure if I have to distinguish between those different file id, in the tests I did, I can't see any difference, so, I take only the first reference I meet to set the breakpoints in.
>
> Lemme know if it is good enough for you.
>
> Frédéric THOMAS


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
@Alexander

Fixed: https://issues.apache.org/jira/browse/FLEX-34346 (the compiled FDB attached)

In a mxml file, when a inline item renderer is defined, a file id is added to the file list of the SWF linking the source of this file, 1 per item renderer + the class itself, the fix says if the path of the source file is found more than once, consider that's the same one.

Not sure if I have to distinguish between those different file id, in the tests I did, I can't see any difference, so, I take only the first reference I meet to set the breakpoints in.

Lemme know if it is good enough for you.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 29 May 2014 17:11:13 +0100
> 
> I just merged the FDBWorkers branch onto the Develop branch, DO NOT DELETE the FDBWorkers branch, it will serve me as base for the Falcon version of FDB.
> 
> @Alexander
> Thanks for catching that, will fix it tomorrow.
> 
> Frédéric THOMAS
> 
> > Date: Thu, 29 May 2014 19:38:37 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > On 29.05.2014 19:08, Frédéric THOMAS wrote:
> > > The lasted FDB: https://issues.apache.org/jira/browse/FLEX-34342 (Break and Clear command should accept paths)
> > Works great!
> > However I was lucky to catch one tricky regression.
> > If MXML file contains inline item renderer(s) then this mxml file has 
> > more than one IDs. FDB from Flex SDK 4.12 is able to set breakpoint by 
> > 'break App.mxml:20', but your latest FDB says
> > Ambiguous matching file names:
> >   App.mxml#68
> >   App.mxml#168
> > and it is impossible to set breakpoint using full path as it is the same 
> > file.
> > Example to reproduce:
> > 
> > <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> >                 xmlns:s="library://ns.adobe.com/flex/spark">
> >      <s:List dataProvider="{new ArrayList([1, 2, 3])}">
> >          <s:itemRenderer>
> >              <fx:Component>
> >                  <s:Button/>
> >              </fx:Component>
> >          </s:itemRenderer>
> >      </s:List>
> >      <fx:Script><![CDATA[
> >          import mx.collections.ArrayList;
> >          ]]></fx:Script>
> > </s:Application>
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
I just merged the FDBWorkers branch onto the Develop branch, DO NOT DELETE the FDBWorkers branch, it will serve me as base for the Falcon version of FDB.

@Alexander
Thanks for catching that, will fix it tomorrow.

Frédéric THOMAS

> Date: Thu, 29 May 2014 19:38:37 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 29.05.2014 19:08, Frédéric THOMAS wrote:
> > The lasted FDB: https://issues.apache.org/jira/browse/FLEX-34342 (Break and Clear command should accept paths)
> Works great!
> However I was lucky to catch one tricky regression.
> If MXML file contains inline item renderer(s) then this mxml file has 
> more than one IDs. FDB from Flex SDK 4.12 is able to set breakpoint by 
> 'break App.mxml:20', but your latest FDB says
> Ambiguous matching file names:
>   App.mxml#68
>   App.mxml#168
> and it is impossible to set breakpoint using full path as it is the same 
> file.
> Example to reproduce:
> 
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>                 xmlns:s="library://ns.adobe.com/flex/spark">
>      <s:List dataProvider="{new ArrayList([1, 2, 3])}">
>          <s:itemRenderer>
>              <fx:Component>
>                  <s:Button/>
>              </fx:Component>
>          </s:itemRenderer>
>      </s:List>
>      <fx:Script><![CDATA[
>          import mx.collections.ArrayList;
>          ]]></fx:Script>
> </s:Application>
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 29.05.2014 19:08, Frédéric THOMAS wrote:
> The lasted FDB: https://issues.apache.org/jira/browse/FLEX-34342 (Break and Clear command should accept paths)
Works great!
However I was lucky to catch one tricky regression.
If MXML file contains inline item renderer(s) then this mxml file has 
more than one IDs. FDB from Flex SDK 4.12 is able to set breakpoint by 
'break App.mxml:20', but your latest FDB says
Ambiguous matching file names:
  App.mxml#68
  App.mxml#168
and it is impossible to set breakpoint using full path as it is the same 
file.
Example to reproduce:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark">
     <s:List dataProvider="{new ArrayList([1, 2, 3])}">
         <s:itemRenderer>
             <fx:Component>
                 <s:Button/>
             </fx:Component>
         </s:itemRenderer>
     </s:List>
     <fx:Script><![CDATA[
         import mx.collections.ArrayList;
         ]]></fx:Script>
</s:Application>

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
The lasted FDB: https://issues.apache.org/jira/browse/FLEX-34342 (Break and Clear command should accept paths)

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 29 May 2014 16:02:43 +0100
> 
> > I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm 
> > afraid this will be a feature for 2 people in the world: you and me. 
> > Most of developers do not care about underlying tools.
> 
> I'm pretty sure that in some scenarios, for worker that generate first impredictable results and then for some, later the code path fails, the user if he has 10+ workers, won't want to go through all workers instances but will want to filter them as soon as he has met the failling impredictable situation, this couldn't be easily or even not at all solved by unit tests, the reason why being able to debug at this level could be important, ok, it seems an edge case, but this case will be met I'm sure in complicated applications.
> 
> It is not a feature for me to play with FDB through IntelliJ, the goal with this feature is to find an easy way to debug at worker instance level.
> 
> Given this feature exists already and could be more user friendly and not hiden by default made me thought it was easy to implement / integrate in the Debug/Console view, if not, I will use the trick you gave me if I met this kind of scenario but what about other people they don't know the trick ?
> 
> Do I make sense ?
> 
> Frédéric THOMAS
> 
> > Date: Thu, 29 May 2014 18:23:54 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm 
> > afraid this will be a feature for 2 people in the world: you and me. 
> > Most of developers do not care about underlying tools.
> > 
> > On 29.05.2014 17:46, Frédéric THOMAS wrote:
> > > Not sure how much extra work it would cost to add this feature as default in the form of a command line input at the botton of the debug/console view and the output in the main part of the console view but it would be a "very nice to have" to interact directly with FDB and give us the possibility to play at worker instance level.
> > >
> > > Frédéric THOMAS
> > 
>  		 	   		  
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Condition added to the breakpoint (that can check worker if needed) or 
just inserting some diagnostics code can do the trick easier, I think. 
My experience makes me think that users do not want to go down to the 
FDB commands level.

On 29.05.2014 19:02, Frédéric THOMAS wrote:
>> I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm
>> afraid this will be a feature for 2 people in the world: you and me.
>> Most of developers do not care about underlying tools.
> I'm pretty sure that in some scenarios, for worker that generate first impredictable results and then for some, later the code path fails, the user if he has 10+ workers, won't want to go through all workers instances but will want to filter them as soon as he has met the failling impredictable situation, this couldn't be easily or even not at all solved by unit tests, the reason why being able to debug at this level could be important, ok, it seems an edge case, but this case will be met I'm sure in complicated applications.
>
> It is not a feature for me to play with FDB through IntelliJ, the goal with this feature is to find an easy way to debug at worker instance level.
>
> Given this feature exists already and could be more user friendly and not hiden by default made me thought it was easy to implement / integrate in the Debug/Console view, if not, I will use the trick you gave me if I met this kind of scenario but what about other people they don't know the trick ?
>
> Do I make sense ?
>
> Frédéric THOMAS
>
>> Date: Thu, 29 May 2014 18:23:54 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>>
>> I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm
>> afraid this will be a feature for 2 people in the world: you and me.
>> Most of developers do not care about underlying tools.
>>
>> On 29.05.2014 17:46, Frédéric THOMAS wrote:
>>> Not sure how much extra work it would cost to add this feature as default in the form of a command line input at the botton of the debug/console view and the output in the main part of the console view but it would be a "very nice to have" to interact directly with FDB and give us the possibility to play at worker instance level.
>>>
>>> Frédéric THOMAS
>   		 	   		


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm 
> afraid this will be a feature for 2 people in the world: you and me. 
> Most of developers do not care about underlying tools.

I'm pretty sure that in some scenarios, for worker that generate first impredictable results and then for some, later the code path fails, the user if he has 10+ workers, won't want to go through all workers instances but will want to filter them as soon as he has met the failling impredictable situation, this couldn't be easily or even not at all solved by unit tests, the reason why being able to debug at this level could be important, ok, it seems an edge case, but this case will be met I'm sure in complicated applications.

It is not a feature for me to play with FDB through IntelliJ, the goal with this feature is to find an easy way to debug at worker instance level.

Given this feature exists already and could be more user friendly and not hiden by default made me thought it was easy to implement / integrate in the Debug/Console view, if not, I will use the trick you gave me if I met this kind of scenario but what about other people they don't know the trick ?

Do I make sense ?

Frédéric THOMAS

> Date: Thu, 29 May 2014 18:23:54 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm 
> afraid this will be a feature for 2 people in the world: you and me. 
> Most of developers do not care about underlying tools.
> 
> On 29.05.2014 17:46, Frédéric THOMAS wrote:
> > Not sure how much extra work it would cost to add this feature as default in the form of a command line input at the botton of the debug/console view and the output in the main part of the console view but it would be a "very nice to have" to interact directly with FDB and give us the possibility to play at worker instance level.
> >
> > Frédéric THOMAS
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
I.e. just more convenient 'Send Commands To Flex Debugger' action? I'm 
afraid this will be a feature for 2 people in the world: you and me. 
Most of developers do not care about underlying tools.

On 29.05.2014 17:46, Frédéric THOMAS wrote:
> Not sure how much extra work it would cost to add this feature as default in the form of a command line input at the botton of the debug/console view and the output in the main part of the console view but it would be a "very nice to have" to interact directly with FDB and give us the possibility to play at worker instance level.
>
> Frédéric THOMAS


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Not sure how much extra work it would cost to add this feature as default in the form of a command line input at the botton of the debug/console view and the output in the main part of the console view but it would be a "very nice to have" to interact directly with FDB and give us the possibility to play at worker instance level.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 29 May 2014 14:28:34 +0100
> 
> Just tried it, not user friendly :-) but very nice feature to achieve my goal, thanks for the trick.
> 
> Frédéric THOMAS
> 
> > Date: Thu, 29 May 2014 17:08:31 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > There's already such action, but we think that it can be useful for IDE 
> > developers only, so it is hidden. To get it add -Didea.is.internal=true 
> > to the *.vmoptions file [1]. Run | Send Commands To Flex Debugger will 
> > appear. Fdb should have (fdb) prompt available when you use it. Dialog 
> > layout may be awful, you'll have to resize it.
> > 
> > [1] https://intellij-support.jetbrains.com/entries/23395793
> > 
> > On 29.05.2014 17:00, Frédéric THOMAS wrote:
> > > Thanks for having made it clearer, got your point but in this case, could we imagine a pass through, i.e. in the debug window, an input for commands to pass directly to FDB ?
> > >
> > > Frédéric THOMAS
> > >
> > >> Date: Thu, 29 May 2014 16:51:58 +0400
> > >> From: alexander.doroshko@jetbrains.com
> > >> To: dev@flex.apache.org
> > >> Subject: Re: [FDB] Integration
> > >>
> > >> On 29.05.2014 16:29, Frédéric THOMAS wrote:
> > >>>> IDE will not set/remove breakpoints per worker, only for all workers,
> > >>>> this seems to be what users expect.
> > >>> Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?
> > >> In Java you can't select thread for which to set the breakpoint. You can
> > >> select what to suspend when breakpoint is hit: affected thread only or
> > >> all threads. Translating to Flash it means:
> > >> - suspend all threads (default in Java): when breakpoint is hit, iterate
> > >> all workers with 'worker X' and send 'halt';
> > >> - suspend affected thread only: default fdb behavior.
> > >> In Java there's nothing similar to  'set breakpoint for selected thread
> > >> only' and I can hardly imagine UI for it.
> > >> As a start I think I'll support default fdb behavior, i.e. suspend only
> > >> affected worker.
> > >   		 	   		
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Just tried it, not user friendly :-) but very nice feature to achieve my goal, thanks for the trick.

Frédéric THOMAS

> Date: Thu, 29 May 2014 17:08:31 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> There's already such action, but we think that it can be useful for IDE 
> developers only, so it is hidden. To get it add -Didea.is.internal=true 
> to the *.vmoptions file [1]. Run | Send Commands To Flex Debugger will 
> appear. Fdb should have (fdb) prompt available when you use it. Dialog 
> layout may be awful, you'll have to resize it.
> 
> [1] https://intellij-support.jetbrains.com/entries/23395793
> 
> On 29.05.2014 17:00, Frédéric THOMAS wrote:
> > Thanks for having made it clearer, got your point but in this case, could we imagine a pass through, i.e. in the debug window, an input for commands to pass directly to FDB ?
> >
> > Frédéric THOMAS
> >
> >> Date: Thu, 29 May 2014 16:51:58 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: [FDB] Integration
> >>
> >> On 29.05.2014 16:29, Frédéric THOMAS wrote:
> >>>> IDE will not set/remove breakpoints per worker, only for all workers,
> >>>> this seems to be what users expect.
> >>> Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?
> >> In Java you can't select thread for which to set the breakpoint. You can
> >> select what to suspend when breakpoint is hit: affected thread only or
> >> all threads. Translating to Flash it means:
> >> - suspend all threads (default in Java): when breakpoint is hit, iterate
> >> all workers with 'worker X' and send 'halt';
> >> - suspend affected thread only: default fdb behavior.
> >> In Java there's nothing similar to  'set breakpoint for selected thread
> >> only' and I can hardly imagine UI for it.
> >> As a start I think I'll support default fdb behavior, i.e. suspend only
> >> affected worker.
> >   		 	   		
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
There's already such action, but we think that it can be useful for IDE 
developers only, so it is hidden. To get it add -Didea.is.internal=true 
to the *.vmoptions file [1]. Run | Send Commands To Flex Debugger will 
appear. Fdb should have (fdb) prompt available when you use it. Dialog 
layout may be awful, you'll have to resize it.

[1] https://intellij-support.jetbrains.com/entries/23395793

On 29.05.2014 17:00, Frédéric THOMAS wrote:
> Thanks for having made it clearer, got your point but in this case, could we imagine a pass through, i.e. in the debug window, an input for commands to pass directly to FDB ?
>
> Frédéric THOMAS
>
>> Date: Thu, 29 May 2014 16:51:58 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>>
>> On 29.05.2014 16:29, Frédéric THOMAS wrote:
>>>> IDE will not set/remove breakpoints per worker, only for all workers,
>>>> this seems to be what users expect.
>>> Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?
>> In Java you can't select thread for which to set the breakpoint. You can
>> select what to suspend when breakpoint is hit: affected thread only or
>> all threads. Translating to Flash it means:
>> - suspend all threads (default in Java): when breakpoint is hit, iterate
>> all workers with 'worker X' and send 'halt';
>> - suspend affected thread only: default fdb behavior.
>> In Java there's nothing similar to  'set breakpoint for selected thread
>> only' and I can hardly imagine UI for it.
>> As a start I think I'll support default fdb behavior, i.e. suspend only
>> affected worker.
>   		 	   		


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Thanks for having made it clearer, got your point but in this case, could we imagine a pass through, i.e. in the debug window, an input for commands to pass directly to FDB ?

Frédéric THOMAS

> Date: Thu, 29 May 2014 16:51:58 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 29.05.2014 16:29, Frédéric THOMAS wrote:
> >> IDE will not set/remove breakpoints per worker, only for all workers,
> >> this seems to be what users expect.
> > Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?
> In Java you can't select thread for which to set the breakpoint. You can 
> select what to suspend when breakpoint is hit: affected thread only or 
> all threads. Translating to Flash it means:
> - suspend all threads (default in Java): when breakpoint is hit, iterate 
> all workers with 'worker X' and send 'halt';
> - suspend affected thread only: default fdb behavior.
> In Java there's nothing similar to  'set breakpoint for selected thread 
> only' and I can hardly imagine UI for it.
> As a start I think I'll support default fdb behavior, i.e. suspend only 
> affected worker.
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 29.05.2014 16:29, Frédéric THOMAS wrote:
>> IDE will not set/remove breakpoints per worker, only for all workers,
>> this seems to be what users expect.
> Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?
In Java you can't select thread for which to set the breakpoint. You can 
select what to suspend when breakpoint is hit: affected thread only or 
all threads. Translating to Flash it means:
- suspend all threads (default in Java): when breakpoint is hit, iterate 
all workers with 'worker X' and send 'halt';
- suspend affected thread only: default fdb behavior.
In Java there's nothing similar to  'set breakpoint for selected thread 
only' and I can hardly imagine UI for it.
As a start I think I'll support default fdb behavior, i.e. suspend only 
affected worker.

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> IDE will not set/remove breakpoints per worker, only for all workers, 
> this seems to be what users expect.

Really ? look at the Java breakpoint window, it allows to set a BP for all threads and also for a particular thread if I'm not wrong, why not for Flex as it is now possible ? we don't have the same needs and expetactions than the Java devs ?

> I plan to work on this when IntelliJ IDEA 14 EAP starts (early July). 
> Actually I have no time to work on this earlier as I have very tight 
> schedule now: a week for urgent tasks, then 2.5 weeks of vacation, then 
> 1.5 weeks of business trip to Google I/O in San Francisco.

Thanks for the info.
Frédéric THOMAS

> Date: Thu, 29 May 2014 16:20:59 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> Thanks for additional explanations!
> IDE will not set/remove breakpoints per worker, only for all workers, 
> this seems to be what users expect.
> Yep, there can be some headache if the same or different breakpoints are 
> hit in different workers, I hope I'll sort it out at IDE side.
> I plan to work on this when IntelliJ IDEA 14 EAP starts (early July). 
> Actually I have no time to work on this earlier as I have very tight 
> schedule now: a week for urgent tasks, then 2.5 weeks of vacation, then 
> 1.5 weeks of business trip to Google I/O in San Francisco.
> 
> Alex
> 
> On 29.05.2014 16:04, Frédéric THOMAS wrote:
> > Ok great, just to be sure you not take me wrong and understand the concept, please follow this commented FDB session:
> >
> > Apache fdb (Flash Player Debugger) [build development]
> > Copyright 2013 The Apache Software Foundation. All rights reserved.
> > (fdb) run
> > Waiting for Player to connect
> > Player connected; session starting.
> > Set breakpoints and then type 'continue' to resume the session.
> > (fdb) run
> > Session already in progress
> > [SWF] MP3Worker.swf - 181 081 bytes after decompression
> > (fdb) where
> > #0   this = [Object 40199809, class='global'].global$init() at <null>:0
> > (fdb) info workers
> > Main Thread 0 - Suspended (Active)
> > ******************************************************************
> > I set a BP on a function that will break very often
> > ******************************************************************
> > (fdb) break mx/core/DebuggableWorker.as:56
> > Breakpoint 1: file DebuggableWorker.as, line 56
> > (fdb) c
> > [WorkerCreate] 1
> > ******************************************************************
> > When an instance of the worker using it is created, the break is propagated
> > ******************************************************************
> > Breakpoint 1: file DebuggableWorker.as, line 56
> > Additional ActionScript code has been loaded from a SWF or a frame.
> > To see all currently loaded files, type 'info files'.
> > Active worker has changed to worker 1
> >
> > Set additional breakpoints as desired, and then type 'continue'.
> > ******************************************************************
> > As you can see in the result of info break
> > ******************************************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1)
> > [SWF] MP3Worker.swf - 528 227 bytes after decompression
> > Set additional breakpoints as desired, and then type 'continue'.
> > ******************************************************************
> > Here, info workers indicate that both workers are suspended:
> > worker 1 because it has just been created.
> > Worker 0 because a break event has been receive from the player (aka our BP has been met).
> > ******************************************************************
> > (fdb) info workers
> > Main Thread 0 - Suspended
> > Worker 1 - Suspended (Active)
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) c
> > ******************************************************************
> > A 'continue' command show us that even 3 break event have been received for this worker
> > ******************************************************************
> > Active worker has changed to worker 0
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > ******************************************************************
> > And then for worker 1
> > ******************************************************************
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> >   ******************************************************************
> >   Now, even if I clear the BP on worker 0
> >   ******************************************************************
> > (fdb) clear @0:mx/core/DebuggableWorker.as:56
> > Active worker has changed to worker Main Thread
> > Active worker has changed to worker 1
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1)
> >          breakpoint already hit 4 time(s)
> > ******************************************************************
> > worker 0 is still suspended, we received 3 break events from worker 1 and 1 from worker 0
> > FDB will then stop 1 more time on this BP, I guess you don't want that at IDE level
> > as the user already removed the BP, you may want to check if the current break
> > is still set in the IDE, if not, just 'continue'
> > ******************************************************************
> > (fdb) info workers
> > Main Thread 0 - Suspended
> > Worker 1 - Suspended (Active)
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > ******************************************************************
> > here is the extra break
> > ******************************************************************
> > Active worker has changed to worker 0
> > Execution halted, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) show break
> > Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to Breakpoint
> > (fdb) c
> >
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) delete break 1
> > (fdb) c
> > halt
> > Do you want to attempt to halt execution? (y or n) y
> > Attempting to halt.
> > To help out, try nudging the Player (e.g. press a button)
> > Execution halted at 0x0000066a (1642)
> > (fdb) where
> > #0   this = [Object 174826401, class='SetIntervalTimer'].Timer/tick() at <null>:0
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > (fdb) info workers
> > Main Thread 0 - Running
> > Worker 1 - Suspended (Active)
> > (fdb) quit
> >
> > Frédéric THOMAS 		 	   		
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Thanks for additional explanations!
IDE will not set/remove breakpoints per worker, only for all workers, 
this seems to be what users expect.
Yep, there can be some headache if the same or different breakpoints are 
hit in different workers, I hope I'll sort it out at IDE side.
I plan to work on this when IntelliJ IDEA 14 EAP starts (early July). 
Actually I have no time to work on this earlier as I have very tight 
schedule now: a week for urgent tasks, then 2.5 weeks of vacation, then 
1.5 weeks of business trip to Google I/O in San Francisco.

Alex

On 29.05.2014 16:04, Frédéric THOMAS wrote:
> Ok great, just to be sure you not take me wrong and understand the concept, please follow this commented FDB session:
>
> Apache fdb (Flash Player Debugger) [build development]
> Copyright 2013 The Apache Software Foundation. All rights reserved.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> (fdb) run
> Session already in progress
> [SWF] MP3Worker.swf - 181 081 bytes after decompression
> (fdb) where
> #0   this = [Object 40199809, class='global'].global$init() at <null>:0
> (fdb) info workers
> Main Thread 0 - Suspended (Active)
> ******************************************************************
> I set a BP on a function that will break very often
> ******************************************************************
> (fdb) break mx/core/DebuggableWorker.as:56
> Breakpoint 1: file DebuggableWorker.as, line 56
> (fdb) c
> [WorkerCreate] 1
> ******************************************************************
> When an instance of the worker using it is created, the break is propagated
> ******************************************************************
> Breakpoint 1: file DebuggableWorker.as, line 56
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> Active worker has changed to worker 1
>
> Set additional breakpoints as desired, and then type 'continue'.
> ******************************************************************
> As you can see in the result of info break
> ******************************************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1)
> [SWF] MP3Worker.swf - 528 227 bytes after decompression
> Set additional breakpoints as desired, and then type 'continue'.
> ******************************************************************
> Here, info workers indicate that both workers are suspended:
> worker 1 because it has just been created.
> Worker 0 because a break event has been receive from the player (aka our BP has been met).
> ******************************************************************
> (fdb) info workers
> Main Thread 0 - Suspended
> Worker 1 - Suspended (Active)
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) c
> ******************************************************************
> A 'continue' command show us that even 3 break event have been received for this worker
> ******************************************************************
> Active worker has changed to worker 0
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> ******************************************************************
> And then for worker 1
> ******************************************************************
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
>   ******************************************************************
>   Now, even if I clear the BP on worker 0
>   ******************************************************************
> (fdb) clear @0:mx/core/DebuggableWorker.as:56
> Active worker has changed to worker Main Thread
> Active worker has changed to worker 1
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1)
>          breakpoint already hit 4 time(s)
> ******************************************************************
> worker 0 is still suspended, we received 3 break events from worker 1 and 1 from worker 0
> FDB will then stop 1 more time on this BP, I guess you don't want that at IDE level
> as the user already removed the BP, you may want to check if the current break
> is still set in the IDE, if not, just 'continue'
> ******************************************************************
> (fdb) info workers
> Main Thread 0 - Suspended
> Worker 1 - Suspended (Active)
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> ******************************************************************
> here is the extra break
> ******************************************************************
> Active worker has changed to worker 0
> Execution halted, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) show break
> Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to Breakpoint
> (fdb) c
>
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) delete break 1
> (fdb) c
> halt
> Do you want to attempt to halt execution? (y or n) y
> Attempting to halt.
> To help out, try nudging the Player (e.g. press a button)
> Execution halted at 0x0000066a (1642)
> (fdb) where
> #0   this = [Object 174826401, class='SetIntervalTimer'].Timer/tick() at <null>:0
> (fdb) info break
> Num Type           Disp Enb Address    What
> (fdb) info workers
> Main Thread 0 - Running
> Worker 1 - Suspended (Active)
> (fdb) quit
>
> Frédéric THOMAS 		 	   		


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Ok great, just to be sure you not take me wrong and understand the concept, please follow this commented FDB session:

Apache fdb (Flash Player Debugger) [build development]
Copyright 2013 The Apache Software Foundation. All rights reserved.
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
(fdb) run
Session already in progress
[SWF] MP3Worker.swf - 181 081 bytes after decompression
(fdb) where
#0   this = [Object 40199809, class='global'].global$init() at <null>:0
(fdb) info workers
Main Thread 0 - Suspended (Active)
******************************************************************
I set a BP on a function that will break very often
******************************************************************
(fdb) break mx/core/DebuggableWorker.as:56
Breakpoint 1: file DebuggableWorker.as, line 56
(fdb) c
[WorkerCreate] 1
******************************************************************
When an instance of the worker using it is created, the break is propagated
******************************************************************
Breakpoint 1: file DebuggableWorker.as, line 56
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Set additional breakpoints as desired, and then type 'continue'.
******************************************************************
As you can see in the result of info break
******************************************************************
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1) 
[SWF] MP3Worker.swf - 528 227 bytes after decompression
Set additional breakpoints as desired, and then type 'continue'.
******************************************************************
Here, info workers indicate that both workers are suspended:
worker 1 because it has just been created.
Worker 0 because a break event has been receive from the player (aka our BP has been met).
******************************************************************
(fdb) info workers
Main Thread 0 - Suspended
Worker 1 - Suspended (Active)
Set additional breakpoints as desired, and then type 'continue'.
(fdb) c
******************************************************************
A 'continue' command show us that even 3 break event have been received for this worker
******************************************************************
Active worker has changed to worker 0
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
******************************************************************
And then for worker 1
******************************************************************
Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
 ******************************************************************
 Now, even if I clear the BP on worker 0
 ******************************************************************
(fdb) clear @0:mx/core/DebuggableWorker.as:56
Active worker has changed to worker Main Thread
Active worker has changed to worker 1
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1) 
        breakpoint already hit 4 time(s)
******************************************************************
worker 0 is still suspended, we received 3 break events from worker 1 and 1 from worker 0
FDB will then stop 1 more time on this BP, I guess you don't want that at IDE level
as the user already removed the BP, you may want to check if the current break
is still set in the IDE, if not, just 'continue'
******************************************************************
(fdb) info workers
Main Thread 0 - Suspended
Worker 1 - Suspended (Active)
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
******************************************************************
here is the extra break
******************************************************************
Active worker has changed to worker 0
Execution halted, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0; 
(fdb) show break
Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to Breakpoint
(fdb) c

Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) delete break 1
(fdb) c
halt
Do you want to attempt to halt execution? (y or n) y
Attempting to halt.
To help out, try nudging the Player (e.g. press a button)
Execution halted at 0x0000066a (1642)
(fdb) where
#0   this = [Object 174826401, class='SetIntervalTimer'].Timer/tick() at <null>:0
(fdb) info break
Num Type           Disp Enb Address    What
(fdb) info workers
Main Thread 0 - Running
Worker 1 - Suspended (Active)
(fdb) quit

Frédéric THOMAS 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 29.05.2014 11:50, Frédéric THOMAS wrote:
>>> AIR users will still have to use the DebuggableWorker class as base
>>> class for their workers and the main app as well though.
>> I'm not sure we can convince all developers to rewrite their workers,
>> but I hope no fatal error happens if fdb fails to suspend worker.
> FDB not being able to halt the player, won't IntelliJ hang up in that case ?
It shouldn't. After timeout FDB returns to its (fdb) prompt, so IDE 
should just ignore that some command failed and continue normal work
>
>> - I have to suspend at least one worker to be able to send 'break'
>> command. Fdb suspends/sets breakpoint/resumes other workers if needed,
>> at the end all workers are in the same state as before break command
>> - the same about 'delete' command.
> Correct.
> Note: For the "delete" command, you can now delete unresolved BP, that wasn't the case before.
>
>> - when breakpoint is hit, only one worker is paused.
> Not correct, look at the debugTickler() at DebuggableWorker.as:56, if I set a BP there and somewhere else in another worker and this last one is hited first, it doesn't mean that the first one won't be hited in between, 2 workers can then be in suspend mode because I received 2 break events even though FDB will process them one at time.
Ok, will handle at IDE side.
>
>> I have one more request for the IDE integration. Using part of file name
>> in 'break' command is dangerous, more than one file may match. Even
>> using full file name is not strict enough: we have a lot of users who
>> had the same-named files in different packages. Currently IntelliJ IDEA
>> tries to use file id instead of file name whenever possible, but with
>> your fixes I start thinking about a different approach. Will it be easy
>> to support relative path in 'break' command syntax? In this case I'll be
>> sending path relative to src root, e.g. 'break
>> flash/display/Sprite.as:99'? Implementation should normalize slashes in
>> known file paths as I'd like to always pass '/' whereas paths returned
>> by Flash Player may contain '\'.
> Ok, implemented, will commit today, you can now do:
>
> break mx\core\DebuggableWorker.as:56
> or
> break mx/core/DebuggableWorker.as:56
Huge thanks for this feature!
>
>> Implementation should normalize slashes in
>>    known file paths as I'd like to always pass '/' whereas paths returned
>>    by Flash Player may contain '\'.

> Sorry, I maybe missed that, do you need that ? on what command ?
I think you didn't miss that because you say that both 'break mx\core\DebuggableWorker.as:56' and 'break mx/core/DebuggableWorker.as:56' work. That's exactly what I meant: 'break' command shouldn't expect the same slashes as returned by 'show files'. Just make sure once again that if 'show files' returns Windows or mixed slashes for some file ('C:\work\project\src\foo/bar\baz.mxml') then 'break foo/bar/baz.mxml:10' works.


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Implementation should normalize slashes in 
  known file paths as I'd like to always pass '/' whereas paths returned 
  by Flash Player may contain '\'.


Sorry, I maybe missed that, do you need that ? on what command ?

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 29 May 2014 08:50:12 +0100
> 
> > > AIR users will still have to use the DebuggableWorker class as base 
> > > class for their workers and the main app as well though. 
> > I'm not sure we can convince all developers to rewrite their workers, 
> > but I hope no fatal error happens if fdb fails to suspend worker.
> 
> FDB not being able to halt the player, won't IntelliJ hang up in that case ?
> 
> > - I have to suspend at least one worker to be able to send 'break' 
> > command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> > at the end all workers are in the same state as before break command
> > - the same about 'delete' command.
> 
> Correct.
> Note: For the "delete" command, you can now delete unresolved BP, that wasn't the case before.
> 
> > - when breakpoint is hit, only one worker is paused.
> 
> Not correct, look at the debugTickler() at DebuggableWorker.as:56, if I set a BP there and somewhere else in another worker and this last one is hited first, it doesn't mean that the first one won't be hited in between, 2 workers can then be in suspend mode because I received 2 break events even though FDB will process them one at time.
> 
> > I have one more request for the IDE integration. Using part of file name 
> > in 'break' command is dangerous, more than one file may match. Even 
> > using full file name is not strict enough: we have a lot of users who 
> > had the same-named files in different packages. Currently IntelliJ IDEA 
> > tries to use file id instead of file name whenever possible, but with 
> > your fixes I start thinking about a different approach. Will it be easy 
> > to support relative path in 'break' command syntax? In this case I'll be 
> > sending path relative to src root, e.g. 'break 
> > flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> > known file paths as I'd like to always pass '/' whereas paths returned 
> > by Flash Player may contain '\'.
> 
> Ok, implemented, will commit today, you can now do:
> 
> break mx\core\DebuggableWorker.as:56
> or
> break mx/core/DebuggableWorker.as:56
> 
> > > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > > what is done for Java and adding a combobox to access threads on top 
> > > of the Frame list ?
> > Shouldn't be extremely hard.
> 
> Can't wait to see that :-)
> 
> Thanks,
> Frédéric THOMAS
> 
> > Date: Wed, 28 May 2014 22:19:10 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > On 28.05.2014 16:06, Frédéric THOMAS wrote:
> > > AIR users will still have to use the DebuggableWorker class as base 
> > > class for their workers and the main app as well though. 
> > I'm not sure we can convince all developers to rewrite their workers, 
> > but I hope no fatal error happens if fdb fails to suspend worker.
> > > I had no problems using it with IntelliJ, waiting for more tests / 
> > > feedback from you though :-) 
> > It really seems to work! Please check if I get all correctly:
> > - I have to suspend at least one worker to be able to send 'break' 
> > command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> > at the end all workers are in the same state as before break command
> > - the same about 'delete' command.
> > - when breakpoint is hit, only one worker is paused.
> > 
> > I have one more request for the IDE integration. Using part of file name 
> > in 'break' command is dangerous, more than one file may match. Even 
> > using full file name is not strict enough: we have a lot of users who 
> > had the same-named files in different packages. Currently IntelliJ IDEA 
> > tries to use file id instead of file name whenever possible, but with 
> > your fixes I start thinking about a different approach. Will it be easy 
> > to support relative path in 'break' command syntax? In this case I'll be 
> > sending path relative to src root, e.g. 'break 
> > flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> > known file paths as I'd like to always pass '/' whereas paths returned 
> > by Flash Player may contain '\'.
> > > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > > what is done for Java and adding a combobox to access threads on top 
> > > of the Frame list ?
> > Shouldn't be extremely hard.
> > 
> > Alex
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> > AIR users will still have to use the DebuggableWorker class as base 
> > class for their workers and the main app as well though. 
> I'm not sure we can convince all developers to rewrite their workers, 
> but I hope no fatal error happens if fdb fails to suspend worker.

FDB not being able to halt the player, won't IntelliJ hang up in that case ?

> - I have to suspend at least one worker to be able to send 'break' 
> command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> at the end all workers are in the same state as before break command
> - the same about 'delete' command.

Correct.
Note: For the "delete" command, you can now delete unresolved BP, that wasn't the case before.

> - when breakpoint is hit, only one worker is paused.

Not correct, look at the debugTickler() at DebuggableWorker.as:56, if I set a BP there and somewhere else in another worker and this last one is hited first, it doesn't mean that the first one won't be hited in between, 2 workers can then be in suspend mode because I received 2 break events even though FDB will process them one at time.

> I have one more request for the IDE integration. Using part of file name 
> in 'break' command is dangerous, more than one file may match. Even 
> using full file name is not strict enough: we have a lot of users who 
> had the same-named files in different packages. Currently IntelliJ IDEA 
> tries to use file id instead of file name whenever possible, but with 
> your fixes I start thinking about a different approach. Will it be easy 
> to support relative path in 'break' command syntax? In this case I'll be 
> sending path relative to src root, e.g. 'break 
> flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> known file paths as I'd like to always pass '/' whereas paths returned 
> by Flash Player may contain '\'.

Ok, implemented, will commit today, you can now do:

break mx\core\DebuggableWorker.as:56
or
break mx/core/DebuggableWorker.as:56

> > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > what is done for Java and adding a combobox to access threads on top 
> > of the Frame list ?
> Shouldn't be extremely hard.

Can't wait to see that :-)

Thanks,
Frédéric THOMAS

> Date: Wed, 28 May 2014 22:19:10 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 28.05.2014 16:06, Frédéric THOMAS wrote:
> > AIR users will still have to use the DebuggableWorker class as base 
> > class for their workers and the main app as well though. 
> I'm not sure we can convince all developers to rewrite their workers, 
> but I hope no fatal error happens if fdb fails to suspend worker.
> > I had no problems using it with IntelliJ, waiting for more tests / 
> > feedback from you though :-) 
> It really seems to work! Please check if I get all correctly:
> - I have to suspend at least one worker to be able to send 'break' 
> command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
> at the end all workers are in the same state as before break command
> - the same about 'delete' command.
> - when breakpoint is hit, only one worker is paused.
> 
> I have one more request for the IDE integration. Using part of file name 
> in 'break' command is dangerous, more than one file may match. Even 
> using full file name is not strict enough: we have a lot of users who 
> had the same-named files in different packages. Currently IntelliJ IDEA 
> tries to use file id instead of file name whenever possible, but with 
> your fixes I start thinking about a different approach. Will it be easy 
> to support relative path in 'break' command syntax? In this case I'll be 
> sending path relative to src root, e.g. 'break 
> flash/display/Sprite.as:99'? Implementation should normalize slashes in 
> known file paths as I'd like to always pass '/' whereas paths returned 
> by Flash Player may contain '\'.
> > I just wonder, is it easily doable to modify the Breakpoint UI like 
> > what is done for Java and adding a combobox to access threads on top 
> > of the Frame list ?
> Shouldn't be extremely hard.
> 
> Alex
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 28.05.2014 16:06, Frédéric THOMAS wrote:
> AIR users will still have to use the DebuggableWorker class as base 
> class for their workers and the main app as well though. 
I'm not sure we can convince all developers to rewrite their workers, 
but I hope no fatal error happens if fdb fails to suspend worker.
> I had no problems using it with IntelliJ, waiting for more tests / 
> feedback from you though :-) 
It really seems to work! Please check if I get all correctly:
- I have to suspend at least one worker to be able to send 'break' 
command. Fdb suspends/sets breakpoint/resumes other workers if needed, 
at the end all workers are in the same state as before break command
- the same about 'delete' command.
- when breakpoint is hit, only one worker is paused.

I have one more request for the IDE integration. Using part of file name 
in 'break' command is dangerous, more than one file may match. Even 
using full file name is not strict enough: we have a lot of users who 
had the same-named files in different packages. Currently IntelliJ IDEA 
tries to use file id instead of file name whenever possible, but with 
your fixes I start thinking about a different approach. Will it be easy 
to support relative path in 'break' command syntax? In this case I'll be 
sending path relative to src root, e.g. 'break 
flash/display/Sprite.as:99'? Implementation should normalize slashes in 
known file paths as I'd like to always pass '/' whereas paths returned 
by Flash Player may contain '\'.
> I just wonder, is it easily doable to modify the Breakpoint UI like 
> what is done for Java and adding a combobox to access threads on top 
> of the Frame list ?
Shouldn't be extremely hard.

Alex

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Trying to support original buggy fdb from closed-source Adobe AIR SDK 
> was a real headache for me.

Adobe still sells FB, not sure they had a lot of interests in spending time on making the DebugCLI working well :P

> Now I start thinking about including your 
> fdb into IntelliJ IDEA installation or just asking IDE users to use 
> debugger from upcoming Apache Flex SDK.

As you like, the AIR users will still have to use the DebuggableWorker class as base class for their workers and the main app as well though.

> I'll play with your fdb today/tomorrow and give more feedback then. 

I had no problems using it with IntelliJ, waiting for more tests / feedback from you though :-)

> Looks like support at IntelliJ side can be rescheduled for the nearest 
> weeks.

That would be really awesome :-)

I just wonder, is it easily doable to modify the Breakpoint UI like what is done for Java and adding a combobox to access threads on top of the Frame list ?

I will commit today or tomorrow on the develop branch to make it available for the next release.

Also, I will make a version for falcon, the drawback is that I will need to re-apply the fixes I did, generally I don't like to maintain 2 versions, the reason why I would have prefered to link Facon at build time to get the needed ASC classes and then maintain only one version.
Anyway, I will do it later, there's no emergency to do it now AFAIK.

Thanks,
Frédéric THOMAS

> Date: Tue, 27 May 2014 18:26:06 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> Sounds awesome!
> Trying to support original buggy fdb from closed-source Adobe AIR SDK 
> was a real headache for me. Now I start thinking about including your 
> fdb into IntelliJ IDEA installation or just asking IDE users to use 
> debugger from upcoming Apache Flex SDK.
> I'll play with your fdb today/tomorrow and give more feedback then. 
> Looks like support at IntelliJ side can be rescheduled for the nearest 
> weeks.
> 
> Alexander
> 
> On 27.05.2014 17:58, Frédéric THOMAS wrote:
> > Hi guys,
> >
> > Done !!
> > see https://issues.apache.org/jira/browse/FLEX-34334  for the compiled FDB
> >
> > I changed completly what I did in the previous fixes to follow the original coding intention, I mean 1 BP for a file/line (or function) and 1 location per worker (swf), so, it means, 1 BP could be set for many workers and not 1 BP / worker as I did before.
> >
> > I also extended the syntaxt of the "break" and "clear" commands to accept worker id as supplementary info prefixing it with "@"(ex: @3:#MyFile.as:56, @3:MyF*:56, @3:MyFi*:MyFunction)
> > Adding the worker id will drive the command to be executed only for that worker, if the BP hasn't been created and the worker id is provided, the BP won't be propagated, allowing to have a BP for only 1 particular worker instance.
> >
> > A commented example using FDB here [1]
> >
> > @Alexander
> > I tried it in IntelliJ, it works very well, indeed, I wasn't able to set  or remove a BP for a particular worker instance because IJ doesn't support the new notation yet and uses only "delete" which remove the all BP, "clear" needs to be used for a particular instance.
> >
> > It would be nice to have you feedback.
> >
> > Now, I think that IJ could add a combo on the top of the Frame list and in the extended panel for a BP, add "all" - "thread" as done in Java :-)
> >
> > Thanks,
> > Frédéric THOMAS
> >
> > [1]
> > Apache fdb (Flash Player Debugger) [build development]
> > Copyright 2013 The Apache Software Foundation. All rights reserved.
> > (fdb) run
> > Waiting for Player to connect
> > Player connected; session starting.
> > Set breakpoints and then type 'continue' to resume the session.
> > (fdb) info workers
> > Main Thread 0 - Suspended (Active)
> > [SWF] MP3Worker.swf - 181 081 bytes after decompression
> > (fdb) where
> > #0   this = [Object 75659105, class='global'].global$init() at <null>:0
> > (fdb) info files
> > ---
> > DebuggableWorker.as#1
> > mx_internal.as#3
> > IFlexAsset.as#5
> > ByteArrayAsset.as#6
> > ---
> > MP3Worker.as#2
> > Workers.as#4
> >
> > ***************************************
> > Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running, not the case at the moment
> > ***************************************
> > (fdb) break Deb*:56
> > ***************************************
> > The info relative to the BP does not include worker info, this is because I didn't modify the property files at the moment.
> > ***************************************
> > Breakpoint 1: file DebuggableWorker.as, line 56
> > ***************************************
> > Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running and at the moment, because is not in our file list, be resolve later.
> > Propagated means: propagated to all existing workers.
> > Resolve later means: As soon as a corresponding file/line (or function name) will be found, it will be resolved.
> > ***************************************
> > (fdb) break Back*:28
> > Breakpoint 2 created, but not yet resolved.
> > The breakpoint will be resolved when the corresponding file or function is loaded.
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0)
> > 2   breakpoint     keep y   0x00000000 Back*:28 (not yet resolved)
> > (fdb) c
> > [WorkerCreate] 1
> > Breakpoint 1: file DebuggableWorker.as, line 56
> > Additional ActionScript code has been loaded from a SWF or a frame.
> > To see all currently loaded files, type 'info files'.
> > Active worker has changed to worker 1
> >
> > Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28
> >
> > Set additional breakpoints as desired, and then type 'continue'.
> > ***************************************
> > A worker has been created and our files have been resolved and propagated.
> > The BP 1 has now 2 location, in worker 1 and 2
> > ***************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1)
> > 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> > [SWF] MP3Worker.swf - 528 227 bytes after decompression
> > Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28
> >
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) c
> >
> > Active worker has changed to worker 0
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> >
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> >   ***************************************
> >   Break and Clear accept worker info in the form @<worker id>, when pass, only the indicated worker is affected by the command
> >   We are asking here to clear the BP of this file only in worker 0 (main thread)
> >   ***************************************
> > (fdb) clear @0:Deb*:56
> > Active worker has changed to worker Main Thread
> > Active worker has changed to worker 1
> > ***************************************
> > The result of info break tells that it has been clear from worker 0 but not from 1
> > ***************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1)
> >          breakpoint already hit 3 time(s)
> > 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> >
> > ***************************************
> > Because the function where we break is called very often, there is an extra break, that's an edge case, usually, it won't break again.
> > ***************************************
> > Active worker has changed to worker 0
> > Execution halted, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> >
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> >   ***************************************
> >   Ask to break in a particualar worker, actually, the breakpoint already exist as we created it before without giving any info relative to the worker (Dev*:56), it has then been created to be propagated, so, even though now, we give and info relative to the worker, it will simply create a new location (aka in the requested worker)
> >   ***************************************
> > (fdb) break @0:Deb*:56
> > Active worker has changed to worker Main Thread
> > Breakpoint 1: file DebuggableWorker.as, line 56
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> >   ***************************************
> >   That's what shows the info break
> >   ***************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1 / 0)
> >          breakpoint already hit 7 time(s)
> > 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> >
> > Active worker has changed to worker 0
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> >
> > Active worker has changed to worker 1
> > Breakpoint 1, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> >   ***************************************
> >   delete break <BP Number> remove the BP in all workers
> >   ***************************************
> > (fdb) delete break 1
> > Active worker has changed to worker 1
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> > (fdb) c
> >
> > ***************************************
> > Still an extra break for the reason mentioned before
> > ***************************************
> > Active worker has changed to worker 0
> > Execution halted, debugTickler() at DebuggableWorker.as:56
> >   56            var i:int = 0;
> > (fdb) c
> > ***************************************
> > And then, normal execution until we halt
> > ***************************************
> > halt
> > Do you want to attempt to halt execution? (y or n) y
> > Attempting to halt.
> > To help out, try nudging the Player (e.g. press a button)
> > Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
> > ***************************************
> > no needs of the 2 BP
> > ***************************************
> > (fdb) delete break 2
> > Active worker has changed to worker 1
> > Active worker has changed to worker Main Thread
> > Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
> > ***************************************
> > info break emptied
> > ***************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > (fdb) show break
> > Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to StopRequest
> > (fdb) info workers
> > Main Thread 0 - Suspended (Active)
> > Worker 1 - Running
> > ***************************************
> > Now, we are creating a new worker specifying the worker id, it will not be propagated.
> > ***************************************
> > (fdb) break @0:Deb*:56
> > Breakpoint 3: file DebuggableWorker.as, line 56
> > ***************************************
> > Info break shows that despite we have 2 workers runnning, it has been set only in the requested one.
> > ***************************************
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > 3   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0)
> > (fdb) delete 3
> > (fdb) info break
> > Num Type           Disp Enb Address    What
> > (fdb) quit
> > The program is running.  Exit anyway? (y or n) y
> >
> > Process finished with exit code 0
> >
> >
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Sounds awesome!
Trying to support original buggy fdb from closed-source Adobe AIR SDK 
was a real headache for me. Now I start thinking about including your 
fdb into IntelliJ IDEA installation or just asking IDE users to use 
debugger from upcoming Apache Flex SDK.
I'll play with your fdb today/tomorrow and give more feedback then. 
Looks like support at IntelliJ side can be rescheduled for the nearest 
weeks.

Alexander

On 27.05.2014 17:58, Frédéric THOMAS wrote:
> Hi guys,
>
> Done !!
> see https://issues.apache.org/jira/browse/FLEX-34334  for the compiled FDB
>
> I changed completly what I did in the previous fixes to follow the original coding intention, I mean 1 BP for a file/line (or function) and 1 location per worker (swf), so, it means, 1 BP could be set for many workers and not 1 BP / worker as I did before.
>
> I also extended the syntaxt of the "break" and "clear" commands to accept worker id as supplementary info prefixing it with "@"(ex: @3:#MyFile.as:56, @3:MyF*:56, @3:MyFi*:MyFunction)
> Adding the worker id will drive the command to be executed only for that worker, if the BP hasn't been created and the worker id is provided, the BP won't be propagated, allowing to have a BP for only 1 particular worker instance.
>
> A commented example using FDB here [1]
>
> @Alexander
> I tried it in IntelliJ, it works very well, indeed, I wasn't able to set  or remove a BP for a particular worker instance because IJ doesn't support the new notation yet and uses only "delete" which remove the all BP, "clear" needs to be used for a particular instance.
>
> It would be nice to have you feedback.
>
> Now, I think that IJ could add a combo on the top of the Frame list and in the extended panel for a BP, add "all" - "thread" as done in Java :-)
>
> Thanks,
> Frédéric THOMAS
>
> [1]
> Apache fdb (Flash Player Debugger) [build development]
> Copyright 2013 The Apache Software Foundation. All rights reserved.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> (fdb) info workers
> Main Thread 0 - Suspended (Active)
> [SWF] MP3Worker.swf - 181 081 bytes after decompression
> (fdb) where
> #0   this = [Object 75659105, class='global'].global$init() at <null>:0
> (fdb) info files
> ---
> DebuggableWorker.as#1
> mx_internal.as#3
> IFlexAsset.as#5
> ByteArrayAsset.as#6
> ---
> MP3Worker.as#2
> Workers.as#4
>
> ***************************************
> Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running, not the case at the moment
> ***************************************
> (fdb) break Deb*:56
> ***************************************
> The info relative to the BP does not include worker info, this is because I didn't modify the property files at the moment.
> ***************************************
> Breakpoint 1: file DebuggableWorker.as, line 56
> ***************************************
> Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running and at the moment, because is not in our file list, be resolve later.
> Propagated means: propagated to all existing workers.
> Resolve later means: As soon as a corresponding file/line (or function name) will be found, it will be resolved.
> ***************************************
> (fdb) break Back*:28
> Breakpoint 2 created, but not yet resolved.
> The breakpoint will be resolved when the corresponding file or function is loaded.
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0)
> 2   breakpoint     keep y   0x00000000 Back*:28 (not yet resolved)
> (fdb) c
> [WorkerCreate] 1
> Breakpoint 1: file DebuggableWorker.as, line 56
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> Active worker has changed to worker 1
>
> Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28
>
> Set additional breakpoints as desired, and then type 'continue'.
> ***************************************
> A worker has been created and our files have been resolved and propagated.
> The BP 1 has now 2 location, in worker 1 and 2
> ***************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1)
> 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> [SWF] MP3Worker.swf - 528 227 bytes after decompression
> Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28
>
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) c
>
> Active worker has changed to worker 0
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
>
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
>   ***************************************
>   Break and Clear accept worker info in the form @<worker id>, when pass, only the indicated worker is affected by the command
>   We are asking here to clear the BP of this file only in worker 0 (main thread)
>   ***************************************
> (fdb) clear @0:Deb*:56
> Active worker has changed to worker Main Thread
> Active worker has changed to worker 1
> ***************************************
> The result of info break tells that it has been clear from worker 0 but not from 1
> ***************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1)
>          breakpoint already hit 3 time(s)
> 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
>
> ***************************************
> Because the function where we break is called very often, there is an extra break, that's an edge case, usually, it won't break again.
> ***************************************
> Active worker has changed to worker 0
> Execution halted, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
>
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
>   ***************************************
>   Ask to break in a particualar worker, actually, the breakpoint already exist as we created it before without giving any info relative to the worker (Dev*:56), it has then been created to be propagated, so, even though now, we give and info relative to the worker, it will simply create a new location (aka in the requested worker)
>   ***************************************
> (fdb) break @0:Deb*:56
> Active worker has changed to worker Main Thread
> Breakpoint 1: file DebuggableWorker.as, line 56
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
>   ***************************************
>   That's what shows the info break
>   ***************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> 1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1 / 0)
>          breakpoint already hit 7 time(s)
> 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
>
> Active worker has changed to worker 0
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
>
> Active worker has changed to worker 1
> Breakpoint 1, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
>   ***************************************
>   delete break <BP Number> remove the BP in all workers
>   ***************************************
> (fdb) delete break 1
> Active worker has changed to worker 1
> (fdb) info break
> Num Type           Disp Enb Address    What
> 2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1)
> (fdb) c
>
> ***************************************
> Still an extra break for the reason mentioned before
> ***************************************
> Active worker has changed to worker 0
> Execution halted, debugTickler() at DebuggableWorker.as:56
>   56            var i:int = 0;
> (fdb) c
> ***************************************
> And then, normal execution until we halt
> ***************************************
> halt
> Do you want to attempt to halt execution? (y or n) y
> Attempting to halt.
> To help out, try nudging the Player (e.g. press a button)
> Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
> ***************************************
> no needs of the 2 BP
> ***************************************
> (fdb) delete break 2
> Active worker has changed to worker 1
> Active worker has changed to worker Main Thread
> Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
> ***************************************
> info break emptied
> ***************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> (fdb) show break
> Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to StopRequest
> (fdb) info workers
> Main Thread 0 - Suspended (Active)
> Worker 1 - Running
> ***************************************
> Now, we are creating a new worker specifying the worker id, it will not be propagated.
> ***************************************
> (fdb) break @0:Deb*:56
> Breakpoint 3: file DebuggableWorker.as, line 56
> ***************************************
> Info break shows that despite we have 2 workers runnning, it has been set only in the requested one.
> ***************************************
> (fdb) info break
> Num Type           Disp Enb Address    What
> 3   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0)
> (fdb) delete 3
> (fdb) info break
> Num Type           Disp Enb Address    What
> (fdb) quit
> The program is running.  Exit anyway? (y or n) y
>
> Process finished with exit code 0
>
>


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi guys,

Done !! 
see https://issues.apache.org/jira/browse/FLEX-34334  for the compiled FDB

I changed completly what I did in the previous fixes to follow the original coding intention, I mean 1 BP for a file/line (or function) and 1 location per worker (swf), so, it means, 1 BP could be set for many workers and not 1 BP / worker as I did before.

I also extended the syntaxt of the "break" and "clear" commands to accept worker id as supplementary info prefixing it with "@"(ex: @3:#MyFile.as:56, @3:MyF*:56, @3:MyFi*:MyFunction)
Adding the worker id will drive the command to be executed only for that worker, if the BP hasn't been created and the worker id is provided, the BP won't be propagated, allowing to have a BP for only 1 particular worker instance.

A commented example using FDB here [1]

@Alexander
I tried it in IntelliJ, it works very well, indeed, I wasn't able to set  or remove a BP for a particular worker instance because IJ doesn't support the new notation yet and uses only "delete" which remove the all BP, "clear" needs to be used for a particular instance.

It would be nice to have you feedback.

Now, I think that IJ could add a combo on the top of the Frame list and in the extended panel for a BP, add "all" - "thread" as done in Java :-)

Thanks,
Frédéric THOMAS

[1]
Apache fdb (Flash Player Debugger) [build development]
Copyright 2013 The Apache Software Foundation. All rights reserved.
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
(fdb) info workers
Main Thread 0 - Suspended (Active)
[SWF] MP3Worker.swf - 181 081 bytes after decompression
(fdb) where
#0   this = [Object 75659105, class='global'].global$init() at <null>:0
(fdb) info files
---
DebuggableWorker.as#1
mx_internal.as#3
IFlexAsset.as#5
ByteArrayAsset.as#6
---
MP3Worker.as#2
Workers.as#4

***************************************
Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running, not the case at the moment
***************************************
(fdb) break Deb*:56
***************************************
The info relative to the BP does not include worker info, this is because I didn't modify the property files at the moment.
***************************************
Breakpoint 1: file DebuggableWorker.as, line 56
***************************************
Set a breakpoint on a partial file name, this breakpoint does not include any worker id info, it will then be propagated if there are more workers running and at the moment, because is not in our file list, be resolve later.
Propagated means: propagated to all existing workers.
Resolve later means: As soon as a corresponding file/line (or function name) will be found, it will be resolved.
***************************************
(fdb) break Back*:28
Breakpoint 2 created, but not yet resolved.
The breakpoint will be resolved when the corresponding file or function is loaded.
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0) 
2   breakpoint     keep y   0x00000000 Back*:28 (not yet resolved)
(fdb) c
[WorkerCreate] 1
Breakpoint 1: file DebuggableWorker.as, line 56
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28

Set additional breakpoints as desired, and then type 'continue'.
***************************************
A worker has been created and our files have been resolved and propagated.
The BP 1 has now 2 location, in worker 1 and 2
***************************************
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0 / 1) 
2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1) 
[SWF] MP3Worker.swf - 528 227 bytes after decompression
Resolved breakpoint 2 to onMainToBack() at BackWorker.as:28

Set additional breakpoints as desired, and then type 'continue'.
(fdb) c

Active worker has changed to worker 0
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c

Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
 ***************************************
 Break and Clear accept worker info in the form @<worker id>, when pass, only the indicated worker is affected by the command
 We are asking here to clear the BP of this file only in worker 0 (main thread)
 ***************************************
(fdb) clear @0:Deb*:56
Active worker has changed to worker Main Thread
Active worker has changed to worker 1
***************************************
The result of info break tells that it has been clear from worker 0 but not from 1
***************************************
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1) 
        breakpoint already hit 3 time(s)
2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1) 
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c

***************************************
Because the function where we break is called very often, there is an extra break, that's an edge case, usually, it won't break again.
***************************************
Active worker has changed to worker 0
Execution halted, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c

Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
 ***************************************
 Ask to break in a particualar worker, actually, the breakpoint already exist as we created it before without giving any info relative to the worker (Dev*:56), it has then been created to be propagated, so, even though now, we give and info relative to the worker, it will simply create a new location (aka in the requested worker)
 ***************************************
(fdb) break @0:Deb*:56
Active worker has changed to worker Main Thread
Breakpoint 1: file DebuggableWorker.as, line 56
Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
 ***************************************
 That's what shows the info break
 ***************************************
(fdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 1 / 0) 
        breakpoint already hit 7 time(s)
2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1) 
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c

Active worker has changed to worker 0
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c

Active worker has changed to worker 1
Breakpoint 1, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
 ***************************************
 delete break <BP Number> remove the BP in all workers
 ***************************************
(fdb) delete break 1
Active worker has changed to worker 1
(fdb) info break
Num Type           Disp Enb Address    What
2   breakpoint     keep y   0x00000000 in onMainToBack() at BackWorker.as:28 (Worker 1) 
(fdb) c

***************************************
Still an extra break for the reason mentioned before
***************************************
Active worker has changed to worker 0
Execution halted, debugTickler() at DebuggableWorker.as:56
 56            var i:int = 0;
(fdb) c
***************************************
And then, normal execution until we halt
***************************************
halt
Do you want to attempt to halt execution? (y or n) y
Attempting to halt.
To help out, try nudging the Player (e.g. press a button)
Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
***************************************
no needs of the 2 BP
***************************************
(fdb) delete break 2
Active worker has changed to worker 1
Active worker has changed to worker Main Thread
Execution halted in 'MP3Worker.swf' at 0xffffffff (-1)
***************************************
info break emptied
***************************************
(fdb) info break
Num Type           Disp Enb Address    What
(fdb) show break
Stopped in 'MP3Worker.swf' at 0xffffffff (-1) due to StopRequest
(fdb) info workers
Main Thread 0 - Suspended (Active)
Worker 1 - Running
***************************************
Now, we are creating a new worker specifying the worker id, it will not be propagated.
***************************************
(fdb) break @0:Deb*:56
Breakpoint 3: file DebuggableWorker.as, line 56
***************************************
Info break shows that despite we have 2 workers runnning, it has been set only in the requested one.
***************************************
(fdb) info break
Num Type           Disp Enb Address    What
3   breakpoint     keep y   0x00000000 in debugTickler() at DebuggableWorker.as:56 (Worker 0) 
(fdb) delete 3
(fdb) info break
Num Type           Disp Enb Address    What
(fdb) quit
The program is running.  Exit anyway? (y or n) y

Process finished with exit code 0


> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Sun, 25 May 2014 15:07:15 +0100
> 
> FYI, looking at the pratical usage on IDEs, I changed my mind relative to the fact that breaking in all instances shouldn't be the default behavior, until nobody has objections, I will then implement the default behavior as breaking in all existed and newly created instances of a worker, anyway, I add the possibility to indicate the worker id inb the break / clear commands, in that case, the function will be applied on the worker id only (aka the instance of the worker), an other option to touch a particular breakpoint will be to use delete break <BP NUMBER>, the commands will be smart enought to let you do without to change the active worker.
> 
> Frédéric THOMAS
> 
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > Date: Sun, 25 May 2014 04:01:05 +0000
> > 
> > Awesome!
> > 
> > On 5/24/14 6:12 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > 
> > >To keep you in touch of the progress, with those 2 issues [1] [2] fixed
> > >we can already debug workers using FDB or IntelliJ for simple cases (1
> > >instance of your Workers), I attached a compiled FDB to the last issue
> > >for testing puroposes or if some of you want to play with.
> > >
> > >I'm about to allow to set / remove breakpoints on the same file/line in
> > >all worker instances in a once when FDB will be launch with the extended
> > >worker option (easier to use from an IDE too), I'll keep you in touch as
> > >I progress.
> > >
> > >Frédéric THOMAS
> > >
> > >[1] https://issues.apache.org/jira/browse/FLEX-34332
> > >[2]https://issues.apache.org/jira/browse/FLEX-34333
> > >								
> > >
> > >> From: webdoublefx@hotmail.com
> > >> To: dev@flex.apache.org
> > >> Subject: RE: [FDB] Integration
> > >> Date: Fri, 23 May 2014 13:46:03 +0100
> > >> 
> > >> Hi guys,
> > >> 
> > >> Just to tell you I open a ticket for AIR
> > >>https://bugbase.adobe.com/index.cfm?event=bug&id=3765216 to have the
> > >>fixes I did fixed for AIR FDB too, not sure they will do it though.
> > >> 
> > >> I will push the work I did on the develop branch next week if there's
> > >>no objections.
> > >> 
> > >> 
> > >> 
> > >> Frédéric THOMAS
> > >> 
> > >> > From: webdoublefx@hotmail.com
> > >> > To: dev@flex.apache.org
> > >> > Subject: RE: [FDB] Integration
> > >> > Date: Sat, 3 May 2014 19:15:23 +0100
> > >> > 
> > >> > Resolved another issue [1], so, the last FDB is there.
> > >> > 
> > >> > Frédéric THOMAS
> > >> > 
> > >> > [1] https://issues.apache.org/jira/browse/FLEX-34297
> > >> > 
> > >> > > From: webdoublefx@hotmail.com
> > >> > > To: dev@flex.apache.org
> > >> > > Subject: RE: [FDB] Integration
> > >> > > Date: Sat, 3 May 2014 16:49:30 +0100
> > >> > > 
> > >> > > Hi,
> > >> > > 
> > >> > > I just pushed 2 commits for the issues [1] [2], I would appreciate
> > >>if someone have time to do more testing, I will add the compiled FDB in
> > >>few minutes.
> > >> > > 
> > >> > > Thanks,
> > >> > > Frédéric THOMAS
> > >> > > 
> > >> > > [1] https://issues.apache.org/jira/browse/FLEX-34295
> > >> > > [2] https://issues.apache.org/jira/browse/FLEX-34296
> > >> > > 
> > >> > > > From: webdoublefx@hotmail.com
> > >> > > > To: dev@flex.apache.org
> > >> > > > Subject: RE: [FDB] Integration
> > >> > > > Date: Thu, 1 May 2014 14:43:51 +0100
> > >> > > > 
> > >> > > > Oups, thanks, done !!
> > >> > > > 
> > >> > > > Frédéric THOMAS
> > >> > > > 
> > >> > > > > From: aharui@adobe.com
> > >> > > > > To: dev@flex.apache.org
> > >> > > > > Subject: Re: [FDB] Integration
> > >> > > > > Date: Thu, 1 May 2014 13:35:35 +0000
> > >> > > > > 
> > >> > > > > Hi Fred, the DebuggableWorker class code looks fine.  The file
> > >>should
> > >> > > > > probably have an Apache Header instead of what it has now.
> > >> > > > > 
> > >> > > > > -Alex
> > >> > > > > 
> > >> > > > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com>
> > >>wrote:
> > >> > > > > 
> > >> > > > > >Alex,
> > >> > > > > >
> > >> > > > > >I pushed the commit in the FDBWorkers branch, if you want to
> > >>have a look
> > >> > > > > >before I merge it in Develop, that's won't be now but still.
> > >> > > > > >This is the JIRA
> > >>https://issues.apache.org/jira/browse/FLEX-34294 if you
> > >> > > > > >want to check the code via the "Source" tab instead in few
> > >>minutes.
> > >> > > > > >
> > >> > > > > >Thanks for your help !
> > >> > > > > >
> > >> > > > > >Frédéric THOMAS
> > >> > > > > >
> > >> > > > > >> From: aharui@adobe.com
> > >> > > > > >> To: dev@flex.apache.org
> > >> > > > > >> Subject: Re: [FDB] Integration
> > >> > > > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> > >> > > > > >> 
> > >> > > > > >> I think core.swc is supposed to contain stuff you can use in
> > >>AS3
> > >> > > > > >>projects
> > >> > > > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go
> > >>there?
> > >> > > > > >> 
> > >> > > > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS"
> > >><we...@hotmail.com> wrote:
> > >> > > > > >> 
> > >> > > > > >> >Alex,
> > >> > > > > >> >
> > >> > > > > >> >Too much time on it, the reason why it didn't stop in the
> > >>worker is
> > >> > > > > >> >because the compiled worker didn't included the base worker
> > >>class,
> > >> > > > > >>better
> > >> > > > > >> >that than what I thought :P
> > >> > > > > >> >
> > >> > > > > >> >Also, it's going to work for Flex projects but not for pure
> > >>AS3
> > >> > > > > >>projects
> > >> > > > > >> >if I put that base class in the existing libs, should we
> > >>create an
> > >> > > > > >>other
> > >> > > > > >> >lib that pure AS3 project could reference ? how do you see
> > >>it could be
> > >> > > > > >> >better ?
> > >> > > > > >> >
> > >> > > > > >> >Is it a good solution for IDEs ?
> > >> > > > > >> >
> > >> > > > > >> >Frédéric THOMAS
> > >> > > > > >> >
> > >> > > > > >> >> From: webdoublefx@hotmail.com
> > >> > > > > >> >> To: dev@flex.apache.org
> > >> > > > > >> >> Subject: RE: [FDB] Integration
> > >> > > > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> > >> > > > > >> >> 
> > >> > > > > >> >> It is not even that, even if I stop in the main thread,
> > >>switch to the
> > >> > > > > >> >>worker and try to stop it, it doesn't want, digging
> > >>into....
> > >> > > > > >> >> 
> > >> > > > > >> >> Frédéric THOMAS
> > >> > > > > >> >> 
> > >> > > > > >> >> > From: webdoublefx@hotmail.com
> > >> > > > > >> >> > To: dev@flex.apache.org
> > >> > > > > >> >> > Subject: RE: [FDB] Integration
> > >> > > > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > >> > > > > >> >> > 
> > >> > > > > >> >> > What I did and 1st surprised I thought it was the
> > >>"halt" command to
> > >> > > > > >> >>debug, not even, it was in the main loop and the trick is,
> > >>I had to
> > >> > > > > >>code
> > >> > > > > >> >>to stop only on the main thread, it doesn't work with the
> > >>current
> > >> > > > > >> >>implementation, well, not so but at the end, given once it
> > >>is halted
> > >> > > > > >>we
> > >> > > > > >> >>can switch to another one, halt it and so on.
> > >> > > > > >> >> > 
> > >> > > > > >> >> > So, at the IDE point of view, I'm scared that the users
> > >>can only
> > >> > > > > >>halt
> > >> > > > > >> >>in the main thread even using a base Worker and the fix I
> > >>found, now I
> > >> > > > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> > >> > > > > >> >> > It doesn't answer to the requested message sent to a
> > >>worker:
> > >> > > > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> > >> > > > > >> >>DMessage.InBreakAtExt, every, isolateId);
> > >> > > > > >> >> > 
> > >> > > > > >> >> > Frédéric THOMAS
> > >> > > > > >> >> > 
> > >> > > > > >> >> > > From: aharui@adobe.com
> > >> > > > > >> >> > > To: dev@flex.apache.org
> > >> > > > > >> >> > > Subject: Re: [FDB] Integration
> > >> > > > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > >> > > > > >> >> > >
> > >> > > > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't
> > >>true or
> > >> > > > > >> >>setInterval
> > >> > > > > >> >> > > doesn't work?
> > >> > > > > >> >> > >
> > >> > > > > >> >> > > You've got a new debugger, step through it. ;-)
> > >> > > > > >> >> > >
> > >> > > > > >> >> > > -Alex
> > >> > > > > >> >> > >
> > >> > > > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS"
> > >><we...@hotmail.com>
> > >> > > > > >> >>wrote:
> > >> > > > > >> >> > >
> > >> > > > > >> >> > > >I created a base class that the workers extend but
> > >>doesn't seem
> > >> > > > > >>to
> > >> > > > > >> >>work,
> > >> > > > > >> >> > > >did I miss something ?
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >/**
> > >> > > > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > >> > > > > >> >> > > > */
> > >> > > > > >> >> > > >package {
> > >> > > > > >> >> > > >import flash.display.Sprite;
> > >> > > > > >> >> > > >import flash.system.Capabilities;
> > >> > > > > >> >> > > >import flash.utils.setInterval;
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >public class DebugWorker extends Sprite {
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >    public function DebugWorker() {
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >        // Stick a timer here so that we will
> > >>execute script
> > >> > > > > >>every
> > >> > > > > >> >>1.5s
> > >> > > > > >> >> > > >        // no matter what.
> > >> > > > > >> >> > > >        // This is strictly for the debugger to be
> > >>able to halt.
> > >> > > > > >> >> > > >        // Note: isDebugger is true only with a
> > >>Debugger Player.
> > >> > > > > >> >> > > >        if (Capabilities.isDebugger == true) {
> > >> > > > > >> >> > > >            setInterval(debugTickler, 1500);
> > >> > > > > >> >> > > >        }
> > >> > > > > >> >> > > >    }
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >    /**
> > >> > > > > >> >> > > >     *  @private
> > >> > > > > >> >> > > >     *  This is here so we get the this pointer set
> > >>to
> > >> > > > > >>Application.
> > >> > > > > >> >> > > >     */
> > >> > > > > >> >> > > >    private function debugTickler():void {
> > >> > > > > >> >> > > >        // We need some bytes of code in order to
> > >>have a place
> > >> > > > > >>to
> > >> > > > > >> >>break.
> > >> > > > > >> >> > > >        var i:int = 0;
> > >> > > > > >> >> > > >    }
> > >> > > > > >> >> > > >}
> > >> > > > > >> >> > > >}
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >Frédéric THOMAS
> > >> > > > > >> >> > > >
> > >> > > > > >> >> > > >> From: aharui@adobe.com
> > >> > > > > >> >> > > >> To: dev@flex.apache.org
> > >> > > > > >> >> > > >> Subject: Re: [FDB] Integration
> > >> > > > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> > >> > > > > >><we...@hotmail.com>
> > >> > > > > >> >>wrote:
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > >> >Could be a solution, you meant like the idleTimer
> > >>in
> > >> > > > > >> >>SystemManager ?
> > >> > > > > >> >> > > >> Actually, I was referring to debugTickler in
> > >>Application.as
> > >> > > > > >> >>(both mx and
> > >> > > > > >> >> > > >> spark).
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > >> -Alex
> > >> > > > > >> >> > > >>
> > >> > > > > >> >> > > > 		 	   		
> > >> > > > > >> >> > >
> > >> > > > > >> >> >  		 	   		
> > >> > > > > >> >>  		 	   		
> > >> > > > > >> > 		 	   		
> > >> > > > > >> 
> > >> > > > > > 		 	   		
> > >> > > > > 
> > >> > > >  		 	   		
> > >> > >  		 	   		  
> > >> >  		 	   		  
> > >>  		 	   		  
> > > 		 	   		  
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
FYI, looking at the pratical usage on IDEs, I changed my mind relative to the fact that breaking in all instances shouldn't be the default behavior, until nobody has objections, I will then implement the default behavior as breaking in all existed and newly created instances of a worker, anyway, I add the possibility to indicate the worker id inb the break / clear commands, in that case, the function will be applied on the worker id only (aka the instance of the worker), an other option to touch a particular breakpoint will be to use delete break <BP NUMBER>, the commands will be smart enought to let you do without to change the active worker.

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Sun, 25 May 2014 04:01:05 +0000
> 
> Awesome!
> 
> On 5/24/14 6:12 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >To keep you in touch of the progress, with those 2 issues [1] [2] fixed
> >we can already debug workers using FDB or IntelliJ for simple cases (1
> >instance of your Workers), I attached a compiled FDB to the last issue
> >for testing puroposes or if some of you want to play with.
> >
> >I'm about to allow to set / remove breakpoints on the same file/line in
> >all worker instances in a once when FDB will be launch with the extended
> >worker option (easier to use from an IDE too), I'll keep you in touch as
> >I progress.
> >
> >Frédéric THOMAS
> >
> >[1] https://issues.apache.org/jira/browse/FLEX-34332
> >[2]https://issues.apache.org/jira/browse/FLEX-34333
> >								
> >
> >> From: webdoublefx@hotmail.com
> >> To: dev@flex.apache.org
> >> Subject: RE: [FDB] Integration
> >> Date: Fri, 23 May 2014 13:46:03 +0100
> >> 
> >> Hi guys,
> >> 
> >> Just to tell you I open a ticket for AIR
> >>https://bugbase.adobe.com/index.cfm?event=bug&id=3765216 to have the
> >>fixes I did fixed for AIR FDB too, not sure they will do it though.
> >> 
> >> I will push the work I did on the develop branch next week if there's
> >>no objections.
> >> 
> >> 
> >> 
> >> Frédéric THOMAS
> >> 
> >> > From: webdoublefx@hotmail.com
> >> > To: dev@flex.apache.org
> >> > Subject: RE: [FDB] Integration
> >> > Date: Sat, 3 May 2014 19:15:23 +0100
> >> > 
> >> > Resolved another issue [1], so, the last FDB is there.
> >> > 
> >> > Frédéric THOMAS
> >> > 
> >> > [1] https://issues.apache.org/jira/browse/FLEX-34297
> >> > 
> >> > > From: webdoublefx@hotmail.com
> >> > > To: dev@flex.apache.org
> >> > > Subject: RE: [FDB] Integration
> >> > > Date: Sat, 3 May 2014 16:49:30 +0100
> >> > > 
> >> > > Hi,
> >> > > 
> >> > > I just pushed 2 commits for the issues [1] [2], I would appreciate
> >>if someone have time to do more testing, I will add the compiled FDB in
> >>few minutes.
> >> > > 
> >> > > Thanks,
> >> > > Frédéric THOMAS
> >> > > 
> >> > > [1] https://issues.apache.org/jira/browse/FLEX-34295
> >> > > [2] https://issues.apache.org/jira/browse/FLEX-34296
> >> > > 
> >> > > > From: webdoublefx@hotmail.com
> >> > > > To: dev@flex.apache.org
> >> > > > Subject: RE: [FDB] Integration
> >> > > > Date: Thu, 1 May 2014 14:43:51 +0100
> >> > > > 
> >> > > > Oups, thanks, done !!
> >> > > > 
> >> > > > Frédéric THOMAS
> >> > > > 
> >> > > > > From: aharui@adobe.com
> >> > > > > To: dev@flex.apache.org
> >> > > > > Subject: Re: [FDB] Integration
> >> > > > > Date: Thu, 1 May 2014 13:35:35 +0000
> >> > > > > 
> >> > > > > Hi Fred, the DebuggableWorker class code looks fine.  The file
> >>should
> >> > > > > probably have an Apache Header instead of what it has now.
> >> > > > > 
> >> > > > > -Alex
> >> > > > > 
> >> > > > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com>
> >>wrote:
> >> > > > > 
> >> > > > > >Alex,
> >> > > > > >
> >> > > > > >I pushed the commit in the FDBWorkers branch, if you want to
> >>have a look
> >> > > > > >before I merge it in Develop, that's won't be now but still.
> >> > > > > >This is the JIRA
> >>https://issues.apache.org/jira/browse/FLEX-34294 if you
> >> > > > > >want to check the code via the "Source" tab instead in few
> >>minutes.
> >> > > > > >
> >> > > > > >Thanks for your help !
> >> > > > > >
> >> > > > > >Frédéric THOMAS
> >> > > > > >
> >> > > > > >> From: aharui@adobe.com
> >> > > > > >> To: dev@flex.apache.org
> >> > > > > >> Subject: Re: [FDB] Integration
> >> > > > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> >> > > > > >> 
> >> > > > > >> I think core.swc is supposed to contain stuff you can use in
> >>AS3
> >> > > > > >>projects
> >> > > > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go
> >>there?
> >> > > > > >> 
> >> > > > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS"
> >><we...@hotmail.com> wrote:
> >> > > > > >> 
> >> > > > > >> >Alex,
> >> > > > > >> >
> >> > > > > >> >Too much time on it, the reason why it didn't stop in the
> >>worker is
> >> > > > > >> >because the compiled worker didn't included the base worker
> >>class,
> >> > > > > >>better
> >> > > > > >> >that than what I thought :P
> >> > > > > >> >
> >> > > > > >> >Also, it's going to work for Flex projects but not for pure
> >>AS3
> >> > > > > >>projects
> >> > > > > >> >if I put that base class in the existing libs, should we
> >>create an
> >> > > > > >>other
> >> > > > > >> >lib that pure AS3 project could reference ? how do you see
> >>it could be
> >> > > > > >> >better ?
> >> > > > > >> >
> >> > > > > >> >Is it a good solution for IDEs ?
> >> > > > > >> >
> >> > > > > >> >Frédéric THOMAS
> >> > > > > >> >
> >> > > > > >> >> From: webdoublefx@hotmail.com
> >> > > > > >> >> To: dev@flex.apache.org
> >> > > > > >> >> Subject: RE: [FDB] Integration
> >> > > > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> >> > > > > >> >> 
> >> > > > > >> >> It is not even that, even if I stop in the main thread,
> >>switch to the
> >> > > > > >> >>worker and try to stop it, it doesn't want, digging
> >>into....
> >> > > > > >> >> 
> >> > > > > >> >> Frédéric THOMAS
> >> > > > > >> >> 
> >> > > > > >> >> > From: webdoublefx@hotmail.com
> >> > > > > >> >> > To: dev@flex.apache.org
> >> > > > > >> >> > Subject: RE: [FDB] Integration
> >> > > > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> >> > > > > >> >> > 
> >> > > > > >> >> > What I did and 1st surprised I thought it was the
> >>"halt" command to
> >> > > > > >> >>debug, not even, it was in the main loop and the trick is,
> >>I had to
> >> > > > > >>code
> >> > > > > >> >>to stop only on the main thread, it doesn't work with the
> >>current
> >> > > > > >> >>implementation, well, not so but at the end, given once it
> >>is halted
> >> > > > > >>we
> >> > > > > >> >>can switch to another one, halt it and so on.
> >> > > > > >> >> > 
> >> > > > > >> >> > So, at the IDE point of view, I'm scared that the users
> >>can only
> >> > > > > >>halt
> >> > > > > >> >>in the main thread even using a base Worker and the fix I
> >>found, now I
> >> > > > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> >> > > > > >> >> > It doesn't answer to the requested message sent to a
> >>worker:
> >> > > > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> >> > > > > >> >>DMessage.InBreakAtExt, every, isolateId);
> >> > > > > >> >> > 
> >> > > > > >> >> > Frédéric THOMAS
> >> > > > > >> >> > 
> >> > > > > >> >> > > From: aharui@adobe.com
> >> > > > > >> >> > > To: dev@flex.apache.org
> >> > > > > >> >> > > Subject: Re: [FDB] Integration
> >> > > > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> >> > > > > >> >> > >
> >> > > > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't
> >>true or
> >> > > > > >> >>setInterval
> >> > > > > >> >> > > doesn't work?
> >> > > > > >> >> > >
> >> > > > > >> >> > > You've got a new debugger, step through it. ;-)
> >> > > > > >> >> > >
> >> > > > > >> >> > > -Alex
> >> > > > > >> >> > >
> >> > > > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS"
> >><we...@hotmail.com>
> >> > > > > >> >>wrote:
> >> > > > > >> >> > >
> >> > > > > >> >> > > >I created a base class that the workers extend but
> >>doesn't seem
> >> > > > > >>to
> >> > > > > >> >>work,
> >> > > > > >> >> > > >did I miss something ?
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >/**
> >> > > > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> >> > > > > >> >> > > > */
> >> > > > > >> >> > > >package {
> >> > > > > >> >> > > >import flash.display.Sprite;
> >> > > > > >> >> > > >import flash.system.Capabilities;
> >> > > > > >> >> > > >import flash.utils.setInterval;
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >public class DebugWorker extends Sprite {
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >    public function DebugWorker() {
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >        // Stick a timer here so that we will
> >>execute script
> >> > > > > >>every
> >> > > > > >> >>1.5s
> >> > > > > >> >> > > >        // no matter what.
> >> > > > > >> >> > > >        // This is strictly for the debugger to be
> >>able to halt.
> >> > > > > >> >> > > >        // Note: isDebugger is true only with a
> >>Debugger Player.
> >> > > > > >> >> > > >        if (Capabilities.isDebugger == true) {
> >> > > > > >> >> > > >            setInterval(debugTickler, 1500);
> >> > > > > >> >> > > >        }
> >> > > > > >> >> > > >    }
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >    /**
> >> > > > > >> >> > > >     *  @private
> >> > > > > >> >> > > >     *  This is here so we get the this pointer set
> >>to
> >> > > > > >>Application.
> >> > > > > >> >> > > >     */
> >> > > > > >> >> > > >    private function debugTickler():void {
> >> > > > > >> >> > > >        // We need some bytes of code in order to
> >>have a place
> >> > > > > >>to
> >> > > > > >> >>break.
> >> > > > > >> >> > > >        var i:int = 0;
> >> > > > > >> >> > > >    }
> >> > > > > >> >> > > >}
> >> > > > > >> >> > > >}
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >Frédéric THOMAS
> >> > > > > >> >> > > >
> >> > > > > >> >> > > >> From: aharui@adobe.com
> >> > > > > >> >> > > >> To: dev@flex.apache.org
> >> > > > > >> >> > > >> Subject: Re: [FDB] Integration
> >> > > > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> >> > > > > >><we...@hotmail.com>
> >> > > > > >> >>wrote:
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > >> >Could be a solution, you meant like the idleTimer
> >>in
> >> > > > > >> >>SystemManager ?
> >> > > > > >> >> > > >> Actually, I was referring to debugTickler in
> >>Application.as
> >> > > > > >> >>(both mx and
> >> > > > > >> >> > > >> spark).
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > >> -Alex
> >> > > > > >> >> > > >>
> >> > > > > >> >> > > > 		 	   		
> >> > > > > >> >> > >
> >> > > > > >> >> >  		 	   		
> >> > > > > >> >>  		 	   		
> >> > > > > >> > 		 	   		
> >> > > > > >> 
> >> > > > > > 		 	   		
> >> > > > > 
> >> > > >  		 	   		
> >> > >  		 	   		  
> >> >  		 	   		  
> >>  		 	   		  
> > 		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
Awesome!

On 5/24/14 6:12 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>To keep you in touch of the progress, with those 2 issues [1] [2] fixed
>we can already debug workers using FDB or IntelliJ for simple cases (1
>instance of your Workers), I attached a compiled FDB to the last issue
>for testing puroposes or if some of you want to play with.
>
>I'm about to allow to set / remove breakpoints on the same file/line in
>all worker instances in a once when FDB will be launch with the extended
>worker option (easier to use from an IDE too), I'll keep you in touch as
>I progress.
>
>Frédéric THOMAS
>
>[1] https://issues.apache.org/jira/browse/FLEX-34332
>[2]https://issues.apache.org/jira/browse/FLEX-34333
>								
>
>> From: webdoublefx@hotmail.com
>> To: dev@flex.apache.org
>> Subject: RE: [FDB] Integration
>> Date: Fri, 23 May 2014 13:46:03 +0100
>> 
>> Hi guys,
>> 
>> Just to tell you I open a ticket for AIR
>>https://bugbase.adobe.com/index.cfm?event=bug&id=3765216 to have the
>>fixes I did fixed for AIR FDB too, not sure they will do it though.
>> 
>> I will push the work I did on the develop branch next week if there's
>>no objections.
>> 
>> 
>> 
>> Frédéric THOMAS
>> 
>> > From: webdoublefx@hotmail.com
>> > To: dev@flex.apache.org
>> > Subject: RE: [FDB] Integration
>> > Date: Sat, 3 May 2014 19:15:23 +0100
>> > 
>> > Resolved another issue [1], so, the last FDB is there.
>> > 
>> > Frédéric THOMAS
>> > 
>> > [1] https://issues.apache.org/jira/browse/FLEX-34297
>> > 
>> > > From: webdoublefx@hotmail.com
>> > > To: dev@flex.apache.org
>> > > Subject: RE: [FDB] Integration
>> > > Date: Sat, 3 May 2014 16:49:30 +0100
>> > > 
>> > > Hi,
>> > > 
>> > > I just pushed 2 commits for the issues [1] [2], I would appreciate
>>if someone have time to do more testing, I will add the compiled FDB in
>>few minutes.
>> > > 
>> > > Thanks,
>> > > Frédéric THOMAS
>> > > 
>> > > [1] https://issues.apache.org/jira/browse/FLEX-34295
>> > > [2] https://issues.apache.org/jira/browse/FLEX-34296
>> > > 
>> > > > From: webdoublefx@hotmail.com
>> > > > To: dev@flex.apache.org
>> > > > Subject: RE: [FDB] Integration
>> > > > Date: Thu, 1 May 2014 14:43:51 +0100
>> > > > 
>> > > > Oups, thanks, done !!
>> > > > 
>> > > > Frédéric THOMAS
>> > > > 
>> > > > > From: aharui@adobe.com
>> > > > > To: dev@flex.apache.org
>> > > > > Subject: Re: [FDB] Integration
>> > > > > Date: Thu, 1 May 2014 13:35:35 +0000
>> > > > > 
>> > > > > Hi Fred, the DebuggableWorker class code looks fine.  The file
>>should
>> > > > > probably have an Apache Header instead of what it has now.
>> > > > > 
>> > > > > -Alex
>> > > > > 
>> > > > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com>
>>wrote:
>> > > > > 
>> > > > > >Alex,
>> > > > > >
>> > > > > >I pushed the commit in the FDBWorkers branch, if you want to
>>have a look
>> > > > > >before I merge it in Develop, that's won't be now but still.
>> > > > > >This is the JIRA
>>https://issues.apache.org/jira/browse/FLEX-34294 if you
>> > > > > >want to check the code via the "Source" tab instead in few
>>minutes.
>> > > > > >
>> > > > > >Thanks for your help !
>> > > > > >
>> > > > > >Frédéric THOMAS
>> > > > > >
>> > > > > >> From: aharui@adobe.com
>> > > > > >> To: dev@flex.apache.org
>> > > > > >> Subject: Re: [FDB] Integration
>> > > > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
>> > > > > >> 
>> > > > > >> I think core.swc is supposed to contain stuff you can use in
>>AS3
>> > > > > >>projects
>> > > > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go
>>there?
>> > > > > >> 
>> > > > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS"
>><we...@hotmail.com> wrote:
>> > > > > >> 
>> > > > > >> >Alex,
>> > > > > >> >
>> > > > > >> >Too much time on it, the reason why it didn't stop in the
>>worker is
>> > > > > >> >because the compiled worker didn't included the base worker
>>class,
>> > > > > >>better
>> > > > > >> >that than what I thought :P
>> > > > > >> >
>> > > > > >> >Also, it's going to work for Flex projects but not for pure
>>AS3
>> > > > > >>projects
>> > > > > >> >if I put that base class in the existing libs, should we
>>create an
>> > > > > >>other
>> > > > > >> >lib that pure AS3 project could reference ? how do you see
>>it could be
>> > > > > >> >better ?
>> > > > > >> >
>> > > > > >> >Is it a good solution for IDEs ?
>> > > > > >> >
>> > > > > >> >Frédéric THOMAS
>> > > > > >> >
>> > > > > >> >> From: webdoublefx@hotmail.com
>> > > > > >> >> To: dev@flex.apache.org
>> > > > > >> >> Subject: RE: [FDB] Integration
>> > > > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
>> > > > > >> >> 
>> > > > > >> >> It is not even that, even if I stop in the main thread,
>>switch to the
>> > > > > >> >>worker and try to stop it, it doesn't want, digging
>>into....
>> > > > > >> >> 
>> > > > > >> >> Frédéric THOMAS
>> > > > > >> >> 
>> > > > > >> >> > From: webdoublefx@hotmail.com
>> > > > > >> >> > To: dev@flex.apache.org
>> > > > > >> >> > Subject: RE: [FDB] Integration
>> > > > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
>> > > > > >> >> > 
>> > > > > >> >> > What I did and 1st surprised I thought it was the
>>"halt" command to
>> > > > > >> >>debug, not even, it was in the main loop and the trick is,
>>I had to
>> > > > > >>code
>> > > > > >> >>to stop only on the main thread, it doesn't work with the
>>current
>> > > > > >> >>implementation, well, not so but at the end, given once it
>>is halted
>> > > > > >>we
>> > > > > >> >>can switch to another one, halt it and so on.
>> > > > > >> >> > 
>> > > > > >> >> > So, at the IDE point of view, I'm scared that the users
>>can only
>> > > > > >>halt
>> > > > > >> >>in the main thread even using a base Worker and the fix I
>>found, now I
>> > > > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
>> > > > > >> >> > It doesn't answer to the requested message sent to a
>>worker:
>> > > > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
>> > > > > >> >>DMessage.InBreakAtExt, every, isolateId);
>> > > > > >> >> > 
>> > > > > >> >> > Frédéric THOMAS
>> > > > > >> >> > 
>> > > > > >> >> > > From: aharui@adobe.com
>> > > > > >> >> > > To: dev@flex.apache.org
>> > > > > >> >> > > Subject: Re: [FDB] Integration
>> > > > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
>> > > > > >> >> > >
>> > > > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't
>>true or
>> > > > > >> >>setInterval
>> > > > > >> >> > > doesn't work?
>> > > > > >> >> > >
>> > > > > >> >> > > You've got a new debugger, step through it. ;-)
>> > > > > >> >> > >
>> > > > > >> >> > > -Alex
>> > > > > >> >> > >
>> > > > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS"
>><we...@hotmail.com>
>> > > > > >> >>wrote:
>> > > > > >> >> > >
>> > > > > >> >> > > >I created a base class that the workers extend but
>>doesn't seem
>> > > > > >>to
>> > > > > >> >>work,
>> > > > > >> >> > > >did I miss something ?
>> > > > > >> >> > > >
>> > > > > >> >> > > >/**
>> > > > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
>> > > > > >> >> > > > */
>> > > > > >> >> > > >package {
>> > > > > >> >> > > >import flash.display.Sprite;
>> > > > > >> >> > > >import flash.system.Capabilities;
>> > > > > >> >> > > >import flash.utils.setInterval;
>> > > > > >> >> > > >
>> > > > > >> >> > > >public class DebugWorker extends Sprite {
>> > > > > >> >> > > >
>> > > > > >> >> > > >    public function DebugWorker() {
>> > > > > >> >> > > >
>> > > > > >> >> > > >        // Stick a timer here so that we will
>>execute script
>> > > > > >>every
>> > > > > >> >>1.5s
>> > > > > >> >> > > >        // no matter what.
>> > > > > >> >> > > >        // This is strictly for the debugger to be
>>able to halt.
>> > > > > >> >> > > >        // Note: isDebugger is true only with a
>>Debugger Player.
>> > > > > >> >> > > >        if (Capabilities.isDebugger == true) {
>> > > > > >> >> > > >            setInterval(debugTickler, 1500);
>> > > > > >> >> > > >        }
>> > > > > >> >> > > >    }
>> > > > > >> >> > > >
>> > > > > >> >> > > >    /**
>> > > > > >> >> > > >     *  @private
>> > > > > >> >> > > >     *  This is here so we get the this pointer set
>>to
>> > > > > >>Application.
>> > > > > >> >> > > >     */
>> > > > > >> >> > > >    private function debugTickler():void {
>> > > > > >> >> > > >        // We need some bytes of code in order to
>>have a place
>> > > > > >>to
>> > > > > >> >>break.
>> > > > > >> >> > > >        var i:int = 0;
>> > > > > >> >> > > >    }
>> > > > > >> >> > > >}
>> > > > > >> >> > > >}
>> > > > > >> >> > > >
>> > > > > >> >> > > >
>> > > > > >> >> > > >Frédéric THOMAS
>> > > > > >> >> > > >
>> > > > > >> >> > > >> From: aharui@adobe.com
>> > > > > >> >> > > >> To: dev@flex.apache.org
>> > > > > >> >> > > >> Subject: Re: [FDB] Integration
>> > > > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
>> > > > > >> >> > > >>
>> > > > > >> >> > > >>
>> > > > > >> >> > > >>
>> > > > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
>> > > > > >><we...@hotmail.com>
>> > > > > >> >>wrote:
>> > > > > >> >> > > >>
>> > > > > >> >> > > >> >Could be a solution, you meant like the idleTimer
>>in
>> > > > > >> >>SystemManager ?
>> > > > > >> >> > > >> Actually, I was referring to debugTickler in
>>Application.as
>> > > > > >> >>(both mx and
>> > > > > >> >> > > >> spark).
>> > > > > >> >> > > >>
>> > > > > >> >> > > >> -Alex
>> > > > > >> >> > > >>
>> > > > > >> >> > > > 		 	   		
>> > > > > >> >> > >
>> > > > > >> >> >  		 	   		
>> > > > > >> >>  		 	   		
>> > > > > >> > 		 	   		
>> > > > > >> 
>> > > > > > 		 	   		
>> > > > > 
>> > > >  		 	   		
>> > >  		 	   		  
>> >  		 	   		  
>>  		 	   		  
> 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
To keep you in touch of the progress, with those 2 issues [1] [2] fixed we can already debug workers using FDB or IntelliJ for simple cases (1 instance of your Workers), I attached a compiled FDB to the last issue for testing puroposes or if some of you want to play with.

I'm about to allow to set / remove breakpoints on the same file/line in all worker instances in a once when FDB will be launch with the extended worker option (easier to use from an IDE too), I'll keep you in touch as I progress.

Frédéric THOMAS

[1] https://issues.apache.org/jira/browse/FLEX-34332
[2]https://issues.apache.org/jira/browse/FLEX-34333
								

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Fri, 23 May 2014 13:46:03 +0100
> 
> Hi guys,
> 
> Just to tell you I open a ticket for AIR https://bugbase.adobe.com/index.cfm?event=bug&id=3765216 to have the fixes I did fixed for AIR FDB too, not sure they will do it though.
> 
> I will push the work I did on the develop branch next week if there's no objections.
> 
> 
> 
> Frédéric THOMAS
> 
> > From: webdoublefx@hotmail.com
> > To: dev@flex.apache.org
> > Subject: RE: [FDB] Integration
> > Date: Sat, 3 May 2014 19:15:23 +0100
> > 
> > Resolved another issue [1], so, the last FDB is there.
> > 
> > Frédéric THOMAS
> > 
> > [1] https://issues.apache.org/jira/browse/FLEX-34297
> > 
> > > From: webdoublefx@hotmail.com
> > > To: dev@flex.apache.org
> > > Subject: RE: [FDB] Integration
> > > Date: Sat, 3 May 2014 16:49:30 +0100
> > > 
> > > Hi,
> > > 
> > > I just pushed 2 commits for the issues [1] [2], I would appreciate if someone have time to do more testing, I will add the compiled FDB in few minutes.
> > > 
> > > Thanks,
> > > Frédéric THOMAS
> > > 
> > > [1] https://issues.apache.org/jira/browse/FLEX-34295
> > > [2] https://issues.apache.org/jira/browse/FLEX-34296
> > > 
> > > > From: webdoublefx@hotmail.com
> > > > To: dev@flex.apache.org
> > > > Subject: RE: [FDB] Integration
> > > > Date: Thu, 1 May 2014 14:43:51 +0100
> > > > 
> > > > Oups, thanks, done !!
> > > > 
> > > > Frédéric THOMAS
> > > > 
> > > > > From: aharui@adobe.com
> > > > > To: dev@flex.apache.org
> > > > > Subject: Re: [FDB] Integration
> > > > > Date: Thu, 1 May 2014 13:35:35 +0000
> > > > > 
> > > > > Hi Fred, the DebuggableWorker class code looks fine.  The file should
> > > > > probably have an Apache Header instead of what it has now.
> > > > > 
> > > > > -Alex
> > > > > 
> > > > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > > > 
> > > > > >Alex,
> > > > > >
> > > > > >I pushed the commit in the FDBWorkers branch, if you want to have a look
> > > > > >before I merge it in Develop, that's won't be now but still.
> > > > > >This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
> > > > > >want to check the code via the "Source" tab instead in few minutes.
> > > > > >
> > > > > >Thanks for your help !
> > > > > >
> > > > > >Frédéric THOMAS
> > > > > >
> > > > > >> From: aharui@adobe.com
> > > > > >> To: dev@flex.apache.org
> > > > > >> Subject: Re: [FDB] Integration
> > > > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> > > > > >> 
> > > > > >> I think core.swc is supposed to contain stuff you can use in AS3
> > > > > >>projects
> > > > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> > > > > >> 
> > > > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > > > >> 
> > > > > >> >Alex,
> > > > > >> >
> > > > > >> >Too much time on it, the reason why it didn't stop in the worker is
> > > > > >> >because the compiled worker didn't included the base worker class,
> > > > > >>better
> > > > > >> >that than what I thought :P
> > > > > >> >
> > > > > >> >Also, it's going to work for Flex projects but not for pure AS3
> > > > > >>projects
> > > > > >> >if I put that base class in the existing libs, should we create an
> > > > > >>other
> > > > > >> >lib that pure AS3 project could reference ? how do you see it could be
> > > > > >> >better ?
> > > > > >> >
> > > > > >> >Is it a good solution for IDEs ?
> > > > > >> >
> > > > > >> >Frédéric THOMAS
> > > > > >> >
> > > > > >> >> From: webdoublefx@hotmail.com
> > > > > >> >> To: dev@flex.apache.org
> > > > > >> >> Subject: RE: [FDB] Integration
> > > > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> > > > > >> >> 
> > > > > >> >> It is not even that, even if I stop in the main thread, switch to the
> > > > > >> >>worker and try to stop it, it doesn't want, digging into....
> > > > > >> >> 
> > > > > >> >> Frédéric THOMAS
> > > > > >> >> 
> > > > > >> >> > From: webdoublefx@hotmail.com
> > > > > >> >> > To: dev@flex.apache.org
> > > > > >> >> > Subject: RE: [FDB] Integration
> > > > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > > > > >> >> > 
> > > > > >> >> > What I did and 1st surprised I thought it was the "halt" command to
> > > > > >> >>debug, not even, it was in the main loop and the trick is, I had to
> > > > > >>code
> > > > > >> >>to stop only on the main thread, it doesn't work with the current
> > > > > >> >>implementation, well, not so but at the end, given once it is halted
> > > > > >>we
> > > > > >> >>can switch to another one, halt it and so on.
> > > > > >> >> > 
> > > > > >> >> > So, at the IDE point of view, I'm scared that the users can only
> > > > > >>halt
> > > > > >> >>in the main thread even using a base Worker and the fix I found, now I
> > > > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> > > > > >> >> > It doesn't answer to the requested message sent to a worker:
> > > > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> > > > > >> >>DMessage.InBreakAtExt, every, isolateId);
> > > > > >> >> > 
> > > > > >> >> > Frédéric THOMAS
> > > > > >> >> > 
> > > > > >> >> > > From: aharui@adobe.com
> > > > > >> >> > > To: dev@flex.apache.org
> > > > > >> >> > > Subject: Re: [FDB] Integration
> > > > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > > > > >> >> > > 
> > > > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> > > > > >> >>setInterval
> > > > > >> >> > > doesn't work?
> > > > > >> >> > > 
> > > > > >> >> > > You've got a new debugger, step through it. ;-)
> > > > > >> >> > > 
> > > > > >> >> > > -Alex
> > > > > >> >> > > 
> > > > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> > > > > >> >>wrote:
> > > > > >> >> > > 
> > > > > >> >> > > >I created a base class that the workers extend but doesn't seem
> > > > > >>to
> > > > > >> >>work,
> > > > > >> >> > > >did I miss something ?
> > > > > >> >> > > >
> > > > > >> >> > > >/**
> > > > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > > > > >> >> > > > */
> > > > > >> >> > > >package {
> > > > > >> >> > > >import flash.display.Sprite;
> > > > > >> >> > > >import flash.system.Capabilities;
> > > > > >> >> > > >import flash.utils.setInterval;
> > > > > >> >> > > >
> > > > > >> >> > > >public class DebugWorker extends Sprite {
> > > > > >> >> > > >
> > > > > >> >> > > >    public function DebugWorker() {
> > > > > >> >> > > >
> > > > > >> >> > > >        // Stick a timer here so that we will execute script
> > > > > >>every
> > > > > >> >>1.5s
> > > > > >> >> > > >        // no matter what.
> > > > > >> >> > > >        // This is strictly for the debugger to be able to halt.
> > > > > >> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> > > > > >> >> > > >        if (Capabilities.isDebugger == true) {
> > > > > >> >> > > >            setInterval(debugTickler, 1500);
> > > > > >> >> > > >        }
> > > > > >> >> > > >    }
> > > > > >> >> > > >
> > > > > >> >> > > >    /**
> > > > > >> >> > > >     *  @private
> > > > > >> >> > > >     *  This is here so we get the this pointer set to
> > > > > >>Application.
> > > > > >> >> > > >     */
> > > > > >> >> > > >    private function debugTickler():void {
> > > > > >> >> > > >        // We need some bytes of code in order to have a place
> > > > > >>to
> > > > > >> >>break.
> > > > > >> >> > > >        var i:int = 0;
> > > > > >> >> > > >    }
> > > > > >> >> > > >}
> > > > > >> >> > > >}
> > > > > >> >> > > >
> > > > > >> >> > > >
> > > > > >> >> > > >Frédéric THOMAS
> > > > > >> >> > > >
> > > > > >> >> > > >> From: aharui@adobe.com
> > > > > >> >> > > >> To: dev@flex.apache.org
> > > > > >> >> > > >> Subject: Re: [FDB] Integration
> > > > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > > > > >> >> > > >> 
> > > > > >> >> > > >> 
> > > > > >> >> > > >> 
> > > > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> > > > > >><we...@hotmail.com>
> > > > > >> >>wrote:
> > > > > >> >> > > >> 
> > > > > >> >> > > >> >Could be a solution, you meant like the idleTimer in
> > > > > >> >>SystemManager ?
> > > > > >> >> > > >> Actually, I was referring to debugTickler in Application.as
> > > > > >> >>(both mx and
> > > > > >> >> > > >> spark).
> > > > > >> >> > > >> 
> > > > > >> >> > > >> -Alex
> > > > > >> >> > > >> 
> > > > > >> >> > > > 		 	   		
> > > > > >> >> > > 
> > > > > >> >> >  		 	   		 
> > > > > >> >>  		 	   		  
> > > > > >> > 		 	   		  
> > > > > >> 
> > > > > > 		 	   		  
> > > > > 
> > > >  		 	   		  
> > >  		 	   		  
> >  		 	   		  
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi guys,

Just to tell you I open a ticket for AIR https://bugbase.adobe.com/index.cfm?event=bug&id=3765216 to have the fixes I did fixed for AIR FDB too, not sure they will do it though.

I will push the work I did on the develop branch next week if there's no objections.



Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Sat, 3 May 2014 19:15:23 +0100
> 
> Resolved another issue [1], so, the last FDB is there.
> 
> Frédéric THOMAS
> 
> [1] https://issues.apache.org/jira/browse/FLEX-34297
> 
> > From: webdoublefx@hotmail.com
> > To: dev@flex.apache.org
> > Subject: RE: [FDB] Integration
> > Date: Sat, 3 May 2014 16:49:30 +0100
> > 
> > Hi,
> > 
> > I just pushed 2 commits for the issues [1] [2], I would appreciate if someone have time to do more testing, I will add the compiled FDB in few minutes.
> > 
> > Thanks,
> > Frédéric THOMAS
> > 
> > [1] https://issues.apache.org/jira/browse/FLEX-34295
> > [2] https://issues.apache.org/jira/browse/FLEX-34296
> > 
> > > From: webdoublefx@hotmail.com
> > > To: dev@flex.apache.org
> > > Subject: RE: [FDB] Integration
> > > Date: Thu, 1 May 2014 14:43:51 +0100
> > > 
> > > Oups, thanks, done !!
> > > 
> > > Frédéric THOMAS
> > > 
> > > > From: aharui@adobe.com
> > > > To: dev@flex.apache.org
> > > > Subject: Re: [FDB] Integration
> > > > Date: Thu, 1 May 2014 13:35:35 +0000
> > > > 
> > > > Hi Fred, the DebuggableWorker class code looks fine.  The file should
> > > > probably have an Apache Header instead of what it has now.
> > > > 
> > > > -Alex
> > > > 
> > > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > > 
> > > > >Alex,
> > > > >
> > > > >I pushed the commit in the FDBWorkers branch, if you want to have a look
> > > > >before I merge it in Develop, that's won't be now but still.
> > > > >This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
> > > > >want to check the code via the "Source" tab instead in few minutes.
> > > > >
> > > > >Thanks for your help !
> > > > >
> > > > >Frédéric THOMAS
> > > > >
> > > > >> From: aharui@adobe.com
> > > > >> To: dev@flex.apache.org
> > > > >> Subject: Re: [FDB] Integration
> > > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> > > > >> 
> > > > >> I think core.swc is supposed to contain stuff you can use in AS3
> > > > >>projects
> > > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> > > > >> 
> > > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > > >> 
> > > > >> >Alex,
> > > > >> >
> > > > >> >Too much time on it, the reason why it didn't stop in the worker is
> > > > >> >because the compiled worker didn't included the base worker class,
> > > > >>better
> > > > >> >that than what I thought :P
> > > > >> >
> > > > >> >Also, it's going to work for Flex projects but not for pure AS3
> > > > >>projects
> > > > >> >if I put that base class in the existing libs, should we create an
> > > > >>other
> > > > >> >lib that pure AS3 project could reference ? how do you see it could be
> > > > >> >better ?
> > > > >> >
> > > > >> >Is it a good solution for IDEs ?
> > > > >> >
> > > > >> >Frédéric THOMAS
> > > > >> >
> > > > >> >> From: webdoublefx@hotmail.com
> > > > >> >> To: dev@flex.apache.org
> > > > >> >> Subject: RE: [FDB] Integration
> > > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> > > > >> >> 
> > > > >> >> It is not even that, even if I stop in the main thread, switch to the
> > > > >> >>worker and try to stop it, it doesn't want, digging into....
> > > > >> >> 
> > > > >> >> Frédéric THOMAS
> > > > >> >> 
> > > > >> >> > From: webdoublefx@hotmail.com
> > > > >> >> > To: dev@flex.apache.org
> > > > >> >> > Subject: RE: [FDB] Integration
> > > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > > > >> >> > 
> > > > >> >> > What I did and 1st surprised I thought it was the "halt" command to
> > > > >> >>debug, not even, it was in the main loop and the trick is, I had to
> > > > >>code
> > > > >> >>to stop only on the main thread, it doesn't work with the current
> > > > >> >>implementation, well, not so but at the end, given once it is halted
> > > > >>we
> > > > >> >>can switch to another one, halt it and so on.
> > > > >> >> > 
> > > > >> >> > So, at the IDE point of view, I'm scared that the users can only
> > > > >>halt
> > > > >> >>in the main thread even using a base Worker and the fix I found, now I
> > > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> > > > >> >> > It doesn't answer to the requested message sent to a worker:
> > > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> > > > >> >>DMessage.InBreakAtExt, every, isolateId);
> > > > >> >> > 
> > > > >> >> > Frédéric THOMAS
> > > > >> >> > 
> > > > >> >> > > From: aharui@adobe.com
> > > > >> >> > > To: dev@flex.apache.org
> > > > >> >> > > Subject: Re: [FDB] Integration
> > > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > > > >> >> > > 
> > > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> > > > >> >>setInterval
> > > > >> >> > > doesn't work?
> > > > >> >> > > 
> > > > >> >> > > You've got a new debugger, step through it. ;-)
> > > > >> >> > > 
> > > > >> >> > > -Alex
> > > > >> >> > > 
> > > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> > > > >> >>wrote:
> > > > >> >> > > 
> > > > >> >> > > >I created a base class that the workers extend but doesn't seem
> > > > >>to
> > > > >> >>work,
> > > > >> >> > > >did I miss something ?
> > > > >> >> > > >
> > > > >> >> > > >/**
> > > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > > > >> >> > > > */
> > > > >> >> > > >package {
> > > > >> >> > > >import flash.display.Sprite;
> > > > >> >> > > >import flash.system.Capabilities;
> > > > >> >> > > >import flash.utils.setInterval;
> > > > >> >> > > >
> > > > >> >> > > >public class DebugWorker extends Sprite {
> > > > >> >> > > >
> > > > >> >> > > >    public function DebugWorker() {
> > > > >> >> > > >
> > > > >> >> > > >        // Stick a timer here so that we will execute script
> > > > >>every
> > > > >> >>1.5s
> > > > >> >> > > >        // no matter what.
> > > > >> >> > > >        // This is strictly for the debugger to be able to halt.
> > > > >> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> > > > >> >> > > >        if (Capabilities.isDebugger == true) {
> > > > >> >> > > >            setInterval(debugTickler, 1500);
> > > > >> >> > > >        }
> > > > >> >> > > >    }
> > > > >> >> > > >
> > > > >> >> > > >    /**
> > > > >> >> > > >     *  @private
> > > > >> >> > > >     *  This is here so we get the this pointer set to
> > > > >>Application.
> > > > >> >> > > >     */
> > > > >> >> > > >    private function debugTickler():void {
> > > > >> >> > > >        // We need some bytes of code in order to have a place
> > > > >>to
> > > > >> >>break.
> > > > >> >> > > >        var i:int = 0;
> > > > >> >> > > >    }
> > > > >> >> > > >}
> > > > >> >> > > >}
> > > > >> >> > > >
> > > > >> >> > > >
> > > > >> >> > > >Frédéric THOMAS
> > > > >> >> > > >
> > > > >> >> > > >> From: aharui@adobe.com
> > > > >> >> > > >> To: dev@flex.apache.org
> > > > >> >> > > >> Subject: Re: [FDB] Integration
> > > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > > > >> >> > > >> 
> > > > >> >> > > >> 
> > > > >> >> > > >> 
> > > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> > > > >><we...@hotmail.com>
> > > > >> >>wrote:
> > > > >> >> > > >> 
> > > > >> >> > > >> >Could be a solution, you meant like the idleTimer in
> > > > >> >>SystemManager ?
> > > > >> >> > > >> Actually, I was referring to debugTickler in Application.as
> > > > >> >>(both mx and
> > > > >> >> > > >> spark).
> > > > >> >> > > >> 
> > > > >> >> > > >> -Alex
> > > > >> >> > > >> 
> > > > >> >> > > > 		 	   		
> > > > >> >> > > 
> > > > >> >> >  		 	   		 
> > > > >> >>  		 	   		  
> > > > >> > 		 	   		  
> > > > >> 
> > > > > 		 	   		  
> > > > 
> > >  		 	   		  
> >  		 	   		  
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Resolved another issue [1], so, the last FDB is there.

Frédéric THOMAS

[1] https://issues.apache.org/jira/browse/FLEX-34297

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Sat, 3 May 2014 16:49:30 +0100
> 
> Hi,
> 
> I just pushed 2 commits for the issues [1] [2], I would appreciate if someone have time to do more testing, I will add the compiled FDB in few minutes.
> 
> Thanks,
> Frédéric THOMAS
> 
> [1] https://issues.apache.org/jira/browse/FLEX-34295
> [2] https://issues.apache.org/jira/browse/FLEX-34296
> 
> > From: webdoublefx@hotmail.com
> > To: dev@flex.apache.org
> > Subject: RE: [FDB] Integration
> > Date: Thu, 1 May 2014 14:43:51 +0100
> > 
> > Oups, thanks, done !!
> > 
> > Frédéric THOMAS
> > 
> > > From: aharui@adobe.com
> > > To: dev@flex.apache.org
> > > Subject: Re: [FDB] Integration
> > > Date: Thu, 1 May 2014 13:35:35 +0000
> > > 
> > > Hi Fred, the DebuggableWorker class code looks fine.  The file should
> > > probably have an Apache Header instead of what it has now.
> > > 
> > > -Alex
> > > 
> > > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > 
> > > >Alex,
> > > >
> > > >I pushed the commit in the FDBWorkers branch, if you want to have a look
> > > >before I merge it in Develop, that's won't be now but still.
> > > >This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
> > > >want to check the code via the "Source" tab instead in few minutes.
> > > >
> > > >Thanks for your help !
> > > >
> > > >Frédéric THOMAS
> > > >
> > > >> From: aharui@adobe.com
> > > >> To: dev@flex.apache.org
> > > >> Subject: Re: [FDB] Integration
> > > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> > > >> 
> > > >> I think core.swc is supposed to contain stuff you can use in AS3
> > > >>projects
> > > >> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> > > >> 
> > > >> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > >> 
> > > >> >Alex,
> > > >> >
> > > >> >Too much time on it, the reason why it didn't stop in the worker is
> > > >> >because the compiled worker didn't included the base worker class,
> > > >>better
> > > >> >that than what I thought :P
> > > >> >
> > > >> >Also, it's going to work for Flex projects but not for pure AS3
> > > >>projects
> > > >> >if I put that base class in the existing libs, should we create an
> > > >>other
> > > >> >lib that pure AS3 project could reference ? how do you see it could be
> > > >> >better ?
> > > >> >
> > > >> >Is it a good solution for IDEs ?
> > > >> >
> > > >> >Frédéric THOMAS
> > > >> >
> > > >> >> From: webdoublefx@hotmail.com
> > > >> >> To: dev@flex.apache.org
> > > >> >> Subject: RE: [FDB] Integration
> > > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> > > >> >> 
> > > >> >> It is not even that, even if I stop in the main thread, switch to the
> > > >> >>worker and try to stop it, it doesn't want, digging into....
> > > >> >> 
> > > >> >> Frédéric THOMAS
> > > >> >> 
> > > >> >> > From: webdoublefx@hotmail.com
> > > >> >> > To: dev@flex.apache.org
> > > >> >> > Subject: RE: [FDB] Integration
> > > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > > >> >> > 
> > > >> >> > What I did and 1st surprised I thought it was the "halt" command to
> > > >> >>debug, not even, it was in the main loop and the trick is, I had to
> > > >>code
> > > >> >>to stop only on the main thread, it doesn't work with the current
> > > >> >>implementation, well, not so but at the end, given once it is halted
> > > >>we
> > > >> >>can switch to another one, halt it and so on.
> > > >> >> > 
> > > >> >> > So, at the IDE point of view, I'm scared that the users can only
> > > >>halt
> > > >> >>in the main thread even using a base Worker and the fix I found, now I
> > > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> > > >> >> > It doesn't answer to the requested message sent to a worker:
> > > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> > > >> >>DMessage.InBreakAtExt, every, isolateId);
> > > >> >> > 
> > > >> >> > Frédéric THOMAS
> > > >> >> > 
> > > >> >> > > From: aharui@adobe.com
> > > >> >> > > To: dev@flex.apache.org
> > > >> >> > > Subject: Re: [FDB] Integration
> > > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > > >> >> > > 
> > > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> > > >> >>setInterval
> > > >> >> > > doesn't work?
> > > >> >> > > 
> > > >> >> > > You've got a new debugger, step through it. ;-)
> > > >> >> > > 
> > > >> >> > > -Alex
> > > >> >> > > 
> > > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> > > >> >>wrote:
> > > >> >> > > 
> > > >> >> > > >I created a base class that the workers extend but doesn't seem
> > > >>to
> > > >> >>work,
> > > >> >> > > >did I miss something ?
> > > >> >> > > >
> > > >> >> > > >/**
> > > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > > >> >> > > > */
> > > >> >> > > >package {
> > > >> >> > > >import flash.display.Sprite;
> > > >> >> > > >import flash.system.Capabilities;
> > > >> >> > > >import flash.utils.setInterval;
> > > >> >> > > >
> > > >> >> > > >public class DebugWorker extends Sprite {
> > > >> >> > > >
> > > >> >> > > >    public function DebugWorker() {
> > > >> >> > > >
> > > >> >> > > >        // Stick a timer here so that we will execute script
> > > >>every
> > > >> >>1.5s
> > > >> >> > > >        // no matter what.
> > > >> >> > > >        // This is strictly for the debugger to be able to halt.
> > > >> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> > > >> >> > > >        if (Capabilities.isDebugger == true) {
> > > >> >> > > >            setInterval(debugTickler, 1500);
> > > >> >> > > >        }
> > > >> >> > > >    }
> > > >> >> > > >
> > > >> >> > > >    /**
> > > >> >> > > >     *  @private
> > > >> >> > > >     *  This is here so we get the this pointer set to
> > > >>Application.
> > > >> >> > > >     */
> > > >> >> > > >    private function debugTickler():void {
> > > >> >> > > >        // We need some bytes of code in order to have a place
> > > >>to
> > > >> >>break.
> > > >> >> > > >        var i:int = 0;
> > > >> >> > > >    }
> > > >> >> > > >}
> > > >> >> > > >}
> > > >> >> > > >
> > > >> >> > > >
> > > >> >> > > >Frédéric THOMAS
> > > >> >> > > >
> > > >> >> > > >> From: aharui@adobe.com
> > > >> >> > > >> To: dev@flex.apache.org
> > > >> >> > > >> Subject: Re: [FDB] Integration
> > > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > > >> >> > > >> 
> > > >> >> > > >> 
> > > >> >> > > >> 
> > > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> > > >><we...@hotmail.com>
> > > >> >>wrote:
> > > >> >> > > >> 
> > > >> >> > > >> >Could be a solution, you meant like the idleTimer in
> > > >> >>SystemManager ?
> > > >> >> > > >> Actually, I was referring to debugTickler in Application.as
> > > >> >>(both mx and
> > > >> >> > > >> spark).
> > > >> >> > > >> 
> > > >> >> > > >> -Alex
> > > >> >> > > >> 
> > > >> >> > > > 		 	   		
> > > >> >> > > 
> > > >> >> >  		 	   		 
> > > >> >>  		 	   		  
> > > >> > 		 	   		  
> > > >> 
> > > > 		 	   		  
> > > 
> >  		 	   		  
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi,

I just pushed 2 commits for the issues [1] [2], I would appreciate if someone have time to do more testing, I will add the compiled FDB in few minutes.

Thanks,
Frédéric THOMAS

[1] https://issues.apache.org/jira/browse/FLEX-34295
[2] https://issues.apache.org/jira/browse/FLEX-34296

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Thu, 1 May 2014 14:43:51 +0100
> 
> Oups, thanks, done !!
> 
> Frédéric THOMAS
> 
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > Date: Thu, 1 May 2014 13:35:35 +0000
> > 
> > Hi Fred, the DebuggableWorker class code looks fine.  The file should
> > probably have an Apache Header instead of what it has now.
> > 
> > -Alex
> > 
> > On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > 
> > >Alex,
> > >
> > >I pushed the commit in the FDBWorkers branch, if you want to have a look
> > >before I merge it in Develop, that's won't be now but still.
> > >This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
> > >want to check the code via the "Source" tab instead in few minutes.
> > >
> > >Thanks for your help !
> > >
> > >Frédéric THOMAS
> > >
> > >> From: aharui@adobe.com
> > >> To: dev@flex.apache.org
> > >> Subject: Re: [FDB] Integration
> > >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> > >> 
> > >> I think core.swc is supposed to contain stuff you can use in AS3
> > >>projects
> > >> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> > >> 
> > >> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > >> 
> > >> >Alex,
> > >> >
> > >> >Too much time on it, the reason why it didn't stop in the worker is
> > >> >because the compiled worker didn't included the base worker class,
> > >>better
> > >> >that than what I thought :P
> > >> >
> > >> >Also, it's going to work for Flex projects but not for pure AS3
> > >>projects
> > >> >if I put that base class in the existing libs, should we create an
> > >>other
> > >> >lib that pure AS3 project could reference ? how do you see it could be
> > >> >better ?
> > >> >
> > >> >Is it a good solution for IDEs ?
> > >> >
> > >> >Frédéric THOMAS
> > >> >
> > >> >> From: webdoublefx@hotmail.com
> > >> >> To: dev@flex.apache.org
> > >> >> Subject: RE: [FDB] Integration
> > >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> > >> >> 
> > >> >> It is not even that, even if I stop in the main thread, switch to the
> > >> >>worker and try to stop it, it doesn't want, digging into....
> > >> >> 
> > >> >> Frédéric THOMAS
> > >> >> 
> > >> >> > From: webdoublefx@hotmail.com
> > >> >> > To: dev@flex.apache.org
> > >> >> > Subject: RE: [FDB] Integration
> > >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > >> >> > 
> > >> >> > What I did and 1st surprised I thought it was the "halt" command to
> > >> >>debug, not even, it was in the main loop and the trick is, I had to
> > >>code
> > >> >>to stop only on the main thread, it doesn't work with the current
> > >> >>implementation, well, not so but at the end, given once it is halted
> > >>we
> > >> >>can switch to another one, halt it and so on.
> > >> >> > 
> > >> >> > So, at the IDE point of view, I'm scared that the users can only
> > >>halt
> > >> >>in the main thread even using a base Worker and the fix I found, now I
> > >> >>wonder if we need to raise a bug in the FlashPlayer ?
> > >> >> > It doesn't answer to the requested message sent to a worker:
> > >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> > >> >>DMessage.InBreakAtExt, every, isolateId);
> > >> >> > 
> > >> >> > Frédéric THOMAS
> > >> >> > 
> > >> >> > > From: aharui@adobe.com
> > >> >> > > To: dev@flex.apache.org
> > >> >> > > Subject: Re: [FDB] Integration
> > >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > >> >> > > 
> > >> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> > >> >>setInterval
> > >> >> > > doesn't work?
> > >> >> > > 
> > >> >> > > You've got a new debugger, step through it. ;-)
> > >> >> > > 
> > >> >> > > -Alex
> > >> >> > > 
> > >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> > >> >>wrote:
> > >> >> > > 
> > >> >> > > >I created a base class that the workers extend but doesn't seem
> > >>to
> > >> >>work,
> > >> >> > > >did I miss something ?
> > >> >> > > >
> > >> >> > > >/**
> > >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > >> >> > > > */
> > >> >> > > >package {
> > >> >> > > >import flash.display.Sprite;
> > >> >> > > >import flash.system.Capabilities;
> > >> >> > > >import flash.utils.setInterval;
> > >> >> > > >
> > >> >> > > >public class DebugWorker extends Sprite {
> > >> >> > > >
> > >> >> > > >    public function DebugWorker() {
> > >> >> > > >
> > >> >> > > >        // Stick a timer here so that we will execute script
> > >>every
> > >> >>1.5s
> > >> >> > > >        // no matter what.
> > >> >> > > >        // This is strictly for the debugger to be able to halt.
> > >> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> > >> >> > > >        if (Capabilities.isDebugger == true) {
> > >> >> > > >            setInterval(debugTickler, 1500);
> > >> >> > > >        }
> > >> >> > > >    }
> > >> >> > > >
> > >> >> > > >    /**
> > >> >> > > >     *  @private
> > >> >> > > >     *  This is here so we get the this pointer set to
> > >>Application.
> > >> >> > > >     */
> > >> >> > > >    private function debugTickler():void {
> > >> >> > > >        // We need some bytes of code in order to have a place
> > >>to
> > >> >>break.
> > >> >> > > >        var i:int = 0;
> > >> >> > > >    }
> > >> >> > > >}
> > >> >> > > >}
> > >> >> > > >
> > >> >> > > >
> > >> >> > > >Frédéric THOMAS
> > >> >> > > >
> > >> >> > > >> From: aharui@adobe.com
> > >> >> > > >> To: dev@flex.apache.org
> > >> >> > > >> Subject: Re: [FDB] Integration
> > >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > >> >> > > >> 
> > >> >> > > >> 
> > >> >> > > >> 
> > >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> > >><we...@hotmail.com>
> > >> >>wrote:
> > >> >> > > >> 
> > >> >> > > >> >Could be a solution, you meant like the idleTimer in
> > >> >>SystemManager ?
> > >> >> > > >> Actually, I was referring to debugTickler in Application.as
> > >> >>(both mx and
> > >> >> > > >> spark).
> > >> >> > > >> 
> > >> >> > > >> -Alex
> > >> >> > > >> 
> > >> >> > > > 		 	   		
> > >> >> > > 
> > >> >> >  		 	   		 
> > >> >>  		 	   		  
> > >> > 		 	   		  
> > >> 
> > > 		 	   		  
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Oups, thanks, done !!

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Thu, 1 May 2014 13:35:35 +0000
> 
> Hi Fred, the DebuggableWorker class code looks fine.  The file should
> probably have an Apache Header instead of what it has now.
> 
> -Alex
> 
> On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >Alex,
> >
> >I pushed the commit in the FDBWorkers branch, if you want to have a look
> >before I merge it in Develop, that's won't be now but still.
> >This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
> >want to check the code via the "Source" tab instead in few minutes.
> >
> >Thanks for your help !
> >
> >Frédéric THOMAS
> >
> >> From: aharui@adobe.com
> >> To: dev@flex.apache.org
> >> Subject: Re: [FDB] Integration
> >> Date: Wed, 30 Apr 2014 20:38:50 +0000
> >> 
> >> I think core.swc is supposed to contain stuff you can use in AS3
> >>projects
> >> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> >> 
> >> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >> 
> >> >Alex,
> >> >
> >> >Too much time on it, the reason why it didn't stop in the worker is
> >> >because the compiled worker didn't included the base worker class,
> >>better
> >> >that than what I thought :P
> >> >
> >> >Also, it's going to work for Flex projects but not for pure AS3
> >>projects
> >> >if I put that base class in the existing libs, should we create an
> >>other
> >> >lib that pure AS3 project could reference ? how do you see it could be
> >> >better ?
> >> >
> >> >Is it a good solution for IDEs ?
> >> >
> >> >Frédéric THOMAS
> >> >
> >> >> From: webdoublefx@hotmail.com
> >> >> To: dev@flex.apache.org
> >> >> Subject: RE: [FDB] Integration
> >> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> >> >> 
> >> >> It is not even that, even if I stop in the main thread, switch to the
> >> >>worker and try to stop it, it doesn't want, digging into....
> >> >> 
> >> >> Frédéric THOMAS
> >> >> 
> >> >> > From: webdoublefx@hotmail.com
> >> >> > To: dev@flex.apache.org
> >> >> > Subject: RE: [FDB] Integration
> >> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> >> >> > 
> >> >> > What I did and 1st surprised I thought it was the "halt" command to
> >> >>debug, not even, it was in the main loop and the trick is, I had to
> >>code
> >> >>to stop only on the main thread, it doesn't work with the current
> >> >>implementation, well, not so but at the end, given once it is halted
> >>we
> >> >>can switch to another one, halt it and so on.
> >> >> > 
> >> >> > So, at the IDE point of view, I'm scared that the users can only
> >>halt
> >> >>in the main thread even using a base Worker and the fix I found, now I
> >> >>wonder if we need to raise a bug in the FlashPlayer ?
> >> >> > It doesn't answer to the requested message sent to a worker:
> >> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> >> >>DMessage.InBreakAtExt, every, isolateId);
> >> >> > 
> >> >> > Frédéric THOMAS
> >> >> > 
> >> >> > > From: aharui@adobe.com
> >> >> > > To: dev@flex.apache.org
> >> >> > > Subject: Re: [FDB] Integration
> >> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> >> >> > > 
> >> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> >> >>setInterval
> >> >> > > doesn't work?
> >> >> > > 
> >> >> > > You've got a new debugger, step through it. ;-)
> >> >> > > 
> >> >> > > -Alex
> >> >> > > 
> >> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> >> >>wrote:
> >> >> > > 
> >> >> > > >I created a base class that the workers extend but doesn't seem
> >>to
> >> >>work,
> >> >> > > >did I miss something ?
> >> >> > > >
> >> >> > > >/**
> >> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> >> >> > > > */
> >> >> > > >package {
> >> >> > > >import flash.display.Sprite;
> >> >> > > >import flash.system.Capabilities;
> >> >> > > >import flash.utils.setInterval;
> >> >> > > >
> >> >> > > >public class DebugWorker extends Sprite {
> >> >> > > >
> >> >> > > >    public function DebugWorker() {
> >> >> > > >
> >> >> > > >        // Stick a timer here so that we will execute script
> >>every
> >> >>1.5s
> >> >> > > >        // no matter what.
> >> >> > > >        // This is strictly for the debugger to be able to halt.
> >> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> >> >> > > >        if (Capabilities.isDebugger == true) {
> >> >> > > >            setInterval(debugTickler, 1500);
> >> >> > > >        }
> >> >> > > >    }
> >> >> > > >
> >> >> > > >    /**
> >> >> > > >     *  @private
> >> >> > > >     *  This is here so we get the this pointer set to
> >>Application.
> >> >> > > >     */
> >> >> > > >    private function debugTickler():void {
> >> >> > > >        // We need some bytes of code in order to have a place
> >>to
> >> >>break.
> >> >> > > >        var i:int = 0;
> >> >> > > >    }
> >> >> > > >}
> >> >> > > >}
> >> >> > > >
> >> >> > > >
> >> >> > > >Frédéric THOMAS
> >> >> > > >
> >> >> > > >> From: aharui@adobe.com
> >> >> > > >> To: dev@flex.apache.org
> >> >> > > >> Subject: Re: [FDB] Integration
> >> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> >> >> > > >> 
> >> >> > > >> 
> >> >> > > >> 
> >> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
> >><we...@hotmail.com>
> >> >>wrote:
> >> >> > > >> 
> >> >> > > >> >Could be a solution, you meant like the idleTimer in
> >> >>SystemManager ?
> >> >> > > >> Actually, I was referring to debugTickler in Application.as
> >> >>(both mx and
> >> >> > > >> spark).
> >> >> > > >> 
> >> >> > > >> -Alex
> >> >> > > >> 
> >> >> > > > 		 	   		
> >> >> > > 
> >> >> >  		 	   		 
> >> >>  		 	   		  
> >> > 		 	   		  
> >> 
> > 		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
Hi Fred, the DebuggableWorker class code looks fine.  The file should
probably have an Apache Header instead of what it has now.

-Alex

On 5/1/14 6:21 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Alex,
>
>I pushed the commit in the FDBWorkers branch, if you want to have a look
>before I merge it in Develop, that's won't be now but still.
>This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you
>want to check the code via the "Source" tab instead in few minutes.
>
>Thanks for your help !
>
>Frédéric THOMAS
>
>> From: aharui@adobe.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>> Date: Wed, 30 Apr 2014 20:38:50 +0000
>> 
>> I think core.swc is supposed to contain stuff you can use in AS3
>>projects
>> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
>> 
>> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>> 
>> >Alex,
>> >
>> >Too much time on it, the reason why it didn't stop in the worker is
>> >because the compiled worker didn't included the base worker class,
>>better
>> >that than what I thought :P
>> >
>> >Also, it's going to work for Flex projects but not for pure AS3
>>projects
>> >if I put that base class in the existing libs, should we create an
>>other
>> >lib that pure AS3 project could reference ? how do you see it could be
>> >better ?
>> >
>> >Is it a good solution for IDEs ?
>> >
>> >Frédéric THOMAS
>> >
>> >> From: webdoublefx@hotmail.com
>> >> To: dev@flex.apache.org
>> >> Subject: RE: [FDB] Integration
>> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
>> >> 
>> >> It is not even that, even if I stop in the main thread, switch to the
>> >>worker and try to stop it, it doesn't want, digging into....
>> >> 
>> >> Frédéric THOMAS
>> >> 
>> >> > From: webdoublefx@hotmail.com
>> >> > To: dev@flex.apache.org
>> >> > Subject: RE: [FDB] Integration
>> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
>> >> > 
>> >> > What I did and 1st surprised I thought it was the "halt" command to
>> >>debug, not even, it was in the main loop and the trick is, I had to
>>code
>> >>to stop only on the main thread, it doesn't work with the current
>> >>implementation, well, not so but at the end, given once it is halted
>>we
>> >>can switch to another one, halt it and so on.
>> >> > 
>> >> > So, at the IDE point of view, I'm scared that the users can only
>>halt
>> >>in the main thread even using a base Worker and the fix I found, now I
>> >>wonder if we need to raise a bug in the FlashPlayer ?
>> >> > It doesn't answer to the requested message sent to a worker:
>> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
>> >>DMessage.InBreakAtExt, every, isolateId);
>> >> > 
>> >> > Frédéric THOMAS
>> >> > 
>> >> > > From: aharui@adobe.com
>> >> > > To: dev@flex.apache.org
>> >> > > Subject: Re: [FDB] Integration
>> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
>> >> > > 
>> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
>> >>setInterval
>> >> > > doesn't work?
>> >> > > 
>> >> > > You've got a new debugger, step through it. ;-)
>> >> > > 
>> >> > > -Alex
>> >> > > 
>> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
>> >>wrote:
>> >> > > 
>> >> > > >I created a base class that the workers extend but doesn't seem
>>to
>> >>work,
>> >> > > >did I miss something ?
>> >> > > >
>> >> > > >/**
>> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
>> >> > > > */
>> >> > > >package {
>> >> > > >import flash.display.Sprite;
>> >> > > >import flash.system.Capabilities;
>> >> > > >import flash.utils.setInterval;
>> >> > > >
>> >> > > >public class DebugWorker extends Sprite {
>> >> > > >
>> >> > > >    public function DebugWorker() {
>> >> > > >
>> >> > > >        // Stick a timer here so that we will execute script
>>every
>> >>1.5s
>> >> > > >        // no matter what.
>> >> > > >        // This is strictly for the debugger to be able to halt.
>> >> > > >        // Note: isDebugger is true only with a Debugger Player.
>> >> > > >        if (Capabilities.isDebugger == true) {
>> >> > > >            setInterval(debugTickler, 1500);
>> >> > > >        }
>> >> > > >    }
>> >> > > >
>> >> > > >    /**
>> >> > > >     *  @private
>> >> > > >     *  This is here so we get the this pointer set to
>>Application.
>> >> > > >     */
>> >> > > >    private function debugTickler():void {
>> >> > > >        // We need some bytes of code in order to have a place
>>to
>> >>break.
>> >> > > >        var i:int = 0;
>> >> > > >    }
>> >> > > >}
>> >> > > >}
>> >> > > >
>> >> > > >
>> >> > > >Frédéric THOMAS
>> >> > > >
>> >> > > >> From: aharui@adobe.com
>> >> > > >> To: dev@flex.apache.org
>> >> > > >> Subject: Re: [FDB] Integration
>> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
>> >> > > >> 
>> >> > > >> 
>> >> > > >> 
>> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS"
>><we...@hotmail.com>
>> >>wrote:
>> >> > > >> 
>> >> > > >> >Could be a solution, you meant like the idleTimer in
>> >>SystemManager ?
>> >> > > >> Actually, I was referring to debugTickler in Application.as
>> >>(both mx and
>> >> > > >> spark).
>> >> > > >> 
>> >> > > >> -Alex
>> >> > > >> 
>> >> > > > 		 	   		
>> >> > > 
>> >> >  		 	   		 
>> >>  		 	   		  
>> > 		 	   		  
>> 
> 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Alex,

I pushed the commit in the FDBWorkers branch, if you want to have a look before I merge it in Develop, that's won't be now but still.
This is the JIRA https://issues.apache.org/jira/browse/FLEX-34294 if you want to check the code via the "Source" tab instead in few minutes.

Thanks for your help !

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Wed, 30 Apr 2014 20:38:50 +0000
> 
> I think core.swc is supposed to contain stuff you can use in AS3 projects
> w/o pulling in all of the other Flex stuff.  Maybe it can go there?
> 
> On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >Alex,
> >
> >Too much time on it, the reason why it didn't stop in the worker is
> >because the compiled worker didn't included the base worker class, better
> >that than what I thought :P
> >
> >Also, it's going to work for Flex projects but not for pure AS3 projects
> >if I put that base class in the existing libs, should we create an other
> >lib that pure AS3 project could reference ? how do you see it could be
> >better ?
> >
> >Is it a good solution for IDEs ?
> >
> >Frédéric THOMAS
> >
> >> From: webdoublefx@hotmail.com
> >> To: dev@flex.apache.org
> >> Subject: RE: [FDB] Integration
> >> Date: Wed, 30 Apr 2014 20:17:29 +0100
> >> 
> >> It is not even that, even if I stop in the main thread, switch to the
> >>worker and try to stop it, it doesn't want, digging into....
> >> 
> >> Frédéric THOMAS
> >> 
> >> > From: webdoublefx@hotmail.com
> >> > To: dev@flex.apache.org
> >> > Subject: RE: [FDB] Integration
> >> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> >> > 
> >> > What I did and 1st surprised I thought it was the "halt" command to
> >>debug, not even, it was in the main loop and the trick is, I had to code
> >>to stop only on the main thread, it doesn't work with the current
> >>implementation, well, not so but at the end, given once it is halted we
> >>can switch to another one, halt it and so on.
> >> > 
> >> > So, at the IDE point of view, I'm scared that the users can only halt
> >>in the main thread even using a base Worker and the fix I found, now I
> >>wonder if we need to raise a bug in the FlashPlayer ?
> >> > It doesn't answer to the requested message sent to a worker:
> >>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
> >>DMessage.InBreakAtExt, every, isolateId);
> >> > 
> >> > Frédéric THOMAS
> >> > 
> >> > > From: aharui@adobe.com
> >> > > To: dev@flex.apache.org
> >> > > Subject: Re: [FDB] Integration
> >> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> >> > > 
> >> > > Looks right.  Maybe capabilities.isDebugger isn't true or
> >>setInterval
> >> > > doesn't work?
> >> > > 
> >> > > You've got a new debugger, step through it. ;-)
> >> > > 
> >> > > -Alex
> >> > > 
> >> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
> >>wrote:
> >> > > 
> >> > > >I created a base class that the workers extend but doesn't seem to
> >>work,
> >> > > >did I miss something ?
> >> > > >
> >> > > >/**
> >> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> >> > > > */
> >> > > >package {
> >> > > >import flash.display.Sprite;
> >> > > >import flash.system.Capabilities;
> >> > > >import flash.utils.setInterval;
> >> > > >
> >> > > >public class DebugWorker extends Sprite {
> >> > > >
> >> > > >    public function DebugWorker() {
> >> > > >
> >> > > >        // Stick a timer here so that we will execute script every
> >>1.5s
> >> > > >        // no matter what.
> >> > > >        // This is strictly for the debugger to be able to halt.
> >> > > >        // Note: isDebugger is true only with a Debugger Player.
> >> > > >        if (Capabilities.isDebugger == true) {
> >> > > >            setInterval(debugTickler, 1500);
> >> > > >        }
> >> > > >    }
> >> > > >
> >> > > >    /**
> >> > > >     *  @private
> >> > > >     *  This is here so we get the this pointer set to Application.
> >> > > >     */
> >> > > >    private function debugTickler():void {
> >> > > >        // We need some bytes of code in order to have a place to
> >>break.
> >> > > >        var i:int = 0;
> >> > > >    }
> >> > > >}
> >> > > >}
> >> > > >
> >> > > >
> >> > > >Frédéric THOMAS
> >> > > >
> >> > > >> From: aharui@adobe.com
> >> > > >> To: dev@flex.apache.org
> >> > > >> Subject: Re: [FDB] Integration
> >> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> >> > > >> 
> >> > > >> 
> >> > > >> 
> >> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com>
> >>wrote:
> >> > > >> 
> >> > > >> >Could be a solution, you meant like the idleTimer in
> >>SystemManager ?
> >> > > >> Actually, I was referring to debugTickler in Application.as
> >>(both mx and
> >> > > >> spark).
> >> > > >> 
> >> > > >> -Alex
> >> > > >> 
> >> > > > 		 	   		 
> >> > > 
> >> >  		 	   		  
> >>  		 	   		  
> > 		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
I think core.swc is supposed to contain stuff you can use in AS3 projects
w/o pulling in all of the other Flex stuff.  Maybe it can go there?

On 4/30/14 1:08 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Alex,
>
>Too much time on it, the reason why it didn't stop in the worker is
>because the compiled worker didn't included the base worker class, better
>that than what I thought :P
>
>Also, it's going to work for Flex projects but not for pure AS3 projects
>if I put that base class in the existing libs, should we create an other
>lib that pure AS3 project could reference ? how do you see it could be
>better ?
>
>Is it a good solution for IDEs ?
>
>Frédéric THOMAS
>
>> From: webdoublefx@hotmail.com
>> To: dev@flex.apache.org
>> Subject: RE: [FDB] Integration
>> Date: Wed, 30 Apr 2014 20:17:29 +0100
>> 
>> It is not even that, even if I stop in the main thread, switch to the
>>worker and try to stop it, it doesn't want, digging into....
>> 
>> Frédéric THOMAS
>> 
>> > From: webdoublefx@hotmail.com
>> > To: dev@flex.apache.org
>> > Subject: RE: [FDB] Integration
>> > Date: Wed, 30 Apr 2014 19:47:33 +0100
>> > 
>> > What I did and 1st surprised I thought it was the "halt" command to
>>debug, not even, it was in the main loop and the trick is, I had to code
>>to stop only on the main thread, it doesn't work with the current
>>implementation, well, not so but at the end, given once it is halted we
>>can switch to another one, halt it and so on.
>> > 
>> > So, at the IDE point of view, I'm scared that the users can only halt
>>in the main thread even using a base Worker and the fix I found, now I
>>wonder if we need to raise a bug in the FlashPlayer ?
>> > It doesn't answer to the requested message sent to a worker:
>>simpleRequestResponseMessageIsolate(DMessage.OutStopDebug,
>>DMessage.InBreakAtExt, every, isolateId);
>> > 
>> > Frédéric THOMAS
>> > 
>> > > From: aharui@adobe.com
>> > > To: dev@flex.apache.org
>> > > Subject: Re: [FDB] Integration
>> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
>> > > 
>> > > Looks right.  Maybe capabilities.isDebugger isn't true or
>>setInterval
>> > > doesn't work?
>> > > 
>> > > You've got a new debugger, step through it. ;-)
>> > > 
>> > > -Alex
>> > > 
>> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com>
>>wrote:
>> > > 
>> > > >I created a base class that the workers extend but doesn't seem to
>>work,
>> > > >did I miss something ?
>> > > >
>> > > >/**
>> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
>> > > > */
>> > > >package {
>> > > >import flash.display.Sprite;
>> > > >import flash.system.Capabilities;
>> > > >import flash.utils.setInterval;
>> > > >
>> > > >public class DebugWorker extends Sprite {
>> > > >
>> > > >    public function DebugWorker() {
>> > > >
>> > > >        // Stick a timer here so that we will execute script every
>>1.5s
>> > > >        // no matter what.
>> > > >        // This is strictly for the debugger to be able to halt.
>> > > >        // Note: isDebugger is true only with a Debugger Player.
>> > > >        if (Capabilities.isDebugger == true) {
>> > > >            setInterval(debugTickler, 1500);
>> > > >        }
>> > > >    }
>> > > >
>> > > >    /**
>> > > >     *  @private
>> > > >     *  This is here so we get the this pointer set to Application.
>> > > >     */
>> > > >    private function debugTickler():void {
>> > > >        // We need some bytes of code in order to have a place to
>>break.
>> > > >        var i:int = 0;
>> > > >    }
>> > > >}
>> > > >}
>> > > >
>> > > >
>> > > >Frédéric THOMAS
>> > > >
>> > > >> From: aharui@adobe.com
>> > > >> To: dev@flex.apache.org
>> > > >> Subject: Re: [FDB] Integration
>> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
>> > > >> 
>> > > >> 
>> > > >> 
>> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com>
>>wrote:
>> > > >> 
>> > > >> >Could be a solution, you meant like the idleTimer in
>>SystemManager ?
>> > > >> Actually, I was referring to debugTickler in Application.as
>>(both mx and
>> > > >> spark).
>> > > >> 
>> > > >> -Alex
>> > > >> 
>> > > > 		 	   		 
>> > > 
>> >  		 	   		  
>>  		 	   		  
> 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Alex,

Too much time on it, the reason why it didn't stop in the worker is because the compiled worker didn't included the base worker class, better that than what I thought :P

Also, it's going to work for Flex projects but not for pure AS3 projects if I put that base class in the existing libs, should we create an other lib that pure AS3 project could reference ? how do you see it could be better ?

Is it a good solution for IDEs ?

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Wed, 30 Apr 2014 20:17:29 +0100
> 
> It is not even that, even if I stop in the main thread, switch to the worker and try to stop it, it doesn't want, digging into....
> 
> Frédéric THOMAS
> 
> > From: webdoublefx@hotmail.com
> > To: dev@flex.apache.org
> > Subject: RE: [FDB] Integration
> > Date: Wed, 30 Apr 2014 19:47:33 +0100
> > 
> > What I did and 1st surprised I thought it was the "halt" command to debug, not even, it was in the main loop and the trick is, I had to code to stop only on the main thread, it doesn't work with the current implementation, well, not so but at the end, given once it is halted we can switch to another one, halt it and so on.
> > 
> > So, at the IDE point of view, I'm scared that the users can only halt in the main thread even using a base Worker and the fix I found, now I wonder if we need to raise a bug in the FlashPlayer ? 
> > It doesn't answer to the requested message sent to a worker: simpleRequestResponseMessageIsolate(DMessage.OutStopDebug, DMessage.InBreakAtExt, every, isolateId);
> > 
> > Frédéric THOMAS
> > 
> > > From: aharui@adobe.com
> > > To: dev@flex.apache.org
> > > Subject: Re: [FDB] Integration
> > > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > > 
> > > Looks right.  Maybe capabilities.isDebugger isn't true or setInterval
> > > doesn't work?
> > > 
> > > You've got a new debugger, step through it. ;-)
> > > 
> > > -Alex
> > > 
> > > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > 
> > > >I created a base class that the workers extend but doesn't seem to work,
> > > >did I miss something ?
> > > >
> > > >/**
> > > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > > > */
> > > >package {
> > > >import flash.display.Sprite;
> > > >import flash.system.Capabilities;
> > > >import flash.utils.setInterval;
> > > >
> > > >public class DebugWorker extends Sprite {
> > > >
> > > >    public function DebugWorker() {
> > > >
> > > >        // Stick a timer here so that we will execute script every 1.5s
> > > >        // no matter what.
> > > >        // This is strictly for the debugger to be able to halt.
> > > >        // Note: isDebugger is true only with a Debugger Player.
> > > >        if (Capabilities.isDebugger == true) {
> > > >            setInterval(debugTickler, 1500);
> > > >        }
> > > >    }
> > > >
> > > >    /**
> > > >     *  @private
> > > >     *  This is here so we get the this pointer set to Application.
> > > >     */
> > > >    private function debugTickler():void {
> > > >        // We need some bytes of code in order to have a place to break.
> > > >        var i:int = 0;
> > > >    }
> > > >}
> > > >}
> > > >
> > > >
> > > >Frédéric THOMAS
> > > >
> > > >> From: aharui@adobe.com
> > > >> To: dev@flex.apache.org
> > > >> Subject: Re: [FDB] Integration
> > > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > > >> 
> > > >> 
> > > >> 
> > > >> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > > >> 
> > > >> >Could be a solution, you meant like the idleTimer in SystemManager ?
> > > >> Actually, I was referring to debugTickler in Application.as (both mx and
> > > >> spark).
> > > >> 
> > > >> -Alex
> > > >> 
> > > > 		 	   		  
> > > 
> >  		 	   		  
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
It is not even that, even if I stop in the main thread, switch to the worker and try to stop it, it doesn't want, digging into....

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Wed, 30 Apr 2014 19:47:33 +0100
> 
> What I did and 1st surprised I thought it was the "halt" command to debug, not even, it was in the main loop and the trick is, I had to code to stop only on the main thread, it doesn't work with the current implementation, well, not so but at the end, given once it is halted we can switch to another one, halt it and so on.
> 
> So, at the IDE point of view, I'm scared that the users can only halt in the main thread even using a base Worker and the fix I found, now I wonder if we need to raise a bug in the FlashPlayer ? 
> It doesn't answer to the requested message sent to a worker: simpleRequestResponseMessageIsolate(DMessage.OutStopDebug, DMessage.InBreakAtExt, every, isolateId);
> 
> Frédéric THOMAS
> 
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > Date: Wed, 30 Apr 2014 17:02:01 +0000
> > 
> > Looks right.  Maybe capabilities.isDebugger isn't true or setInterval
> > doesn't work?
> > 
> > You've got a new debugger, step through it. ;-)
> > 
> > -Alex
> > 
> > On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > 
> > >I created a base class that the workers extend but doesn't seem to work,
> > >did I miss something ?
> > >
> > >/**
> > > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > > */
> > >package {
> > >import flash.display.Sprite;
> > >import flash.system.Capabilities;
> > >import flash.utils.setInterval;
> > >
> > >public class DebugWorker extends Sprite {
> > >
> > >    public function DebugWorker() {
> > >
> > >        // Stick a timer here so that we will execute script every 1.5s
> > >        // no matter what.
> > >        // This is strictly for the debugger to be able to halt.
> > >        // Note: isDebugger is true only with a Debugger Player.
> > >        if (Capabilities.isDebugger == true) {
> > >            setInterval(debugTickler, 1500);
> > >        }
> > >    }
> > >
> > >    /**
> > >     *  @private
> > >     *  This is here so we get the this pointer set to Application.
> > >     */
> > >    private function debugTickler():void {
> > >        // We need some bytes of code in order to have a place to break.
> > >        var i:int = 0;
> > >    }
> > >}
> > >}
> > >
> > >
> > >Frédéric THOMAS
> > >
> > >> From: aharui@adobe.com
> > >> To: dev@flex.apache.org
> > >> Subject: Re: [FDB] Integration
> > >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> > >> 
> > >> 
> > >> 
> > >> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> > >> 
> > >> >Could be a solution, you meant like the idleTimer in SystemManager ?
> > >> Actually, I was referring to debugTickler in Application.as (both mx and
> > >> spark).
> > >> 
> > >> -Alex
> > >> 
> > > 		 	   		  
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
What I did and 1st surprised I thought it was the "halt" command to debug, not even, it was in the main loop and the trick is, I had to code to stop only on the main thread, it doesn't work with the current implementation, well, not so but at the end, given once it is halted we can switch to another one, halt it and so on.

So, at the IDE point of view, I'm scared that the users can only halt in the main thread even using a base Worker and the fix I found, now I wonder if we need to raise a bug in the FlashPlayer ? 
It doesn't answer to the requested message sent to a worker: simpleRequestResponseMessageIsolate(DMessage.OutStopDebug, DMessage.InBreakAtExt, every, isolateId);

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Wed, 30 Apr 2014 17:02:01 +0000
> 
> Looks right.  Maybe capabilities.isDebugger isn't true or setInterval
> doesn't work?
> 
> You've got a new debugger, step through it. ;-)
> 
> -Alex
> 
> On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >I created a base class that the workers extend but doesn't seem to work,
> >did I miss something ?
> >
> >/**
> > * User: DoubleFx Date: 30/04/2014 Time: 17:34
> > */
> >package {
> >import flash.display.Sprite;
> >import flash.system.Capabilities;
> >import flash.utils.setInterval;
> >
> >public class DebugWorker extends Sprite {
> >
> >    public function DebugWorker() {
> >
> >        // Stick a timer here so that we will execute script every 1.5s
> >        // no matter what.
> >        // This is strictly for the debugger to be able to halt.
> >        // Note: isDebugger is true only with a Debugger Player.
> >        if (Capabilities.isDebugger == true) {
> >            setInterval(debugTickler, 1500);
> >        }
> >    }
> >
> >    /**
> >     *  @private
> >     *  This is here so we get the this pointer set to Application.
> >     */
> >    private function debugTickler():void {
> >        // We need some bytes of code in order to have a place to break.
> >        var i:int = 0;
> >    }
> >}
> >}
> >
> >
> >Frédéric THOMAS
> >
> >> From: aharui@adobe.com
> >> To: dev@flex.apache.org
> >> Subject: Re: [FDB] Integration
> >> Date: Wed, 30 Apr 2014 16:18:04 +0000
> >> 
> >> 
> >> 
> >> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >> 
> >> >Could be a solution, you meant like the idleTimer in SystemManager ?
> >> Actually, I was referring to debugTickler in Application.as (both mx and
> >> spark).
> >> 
> >> -Alex
> >> 
> > 		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
Looks right.  Maybe capabilities.isDebugger isn't true or setInterval
doesn't work?

You've got a new debugger, step through it. ;-)

-Alex

On 4/30/14 9:58 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>I created a base class that the workers extend but doesn't seem to work,
>did I miss something ?
>
>/**
> * User: DoubleFx Date: 30/04/2014 Time: 17:34
> */
>package {
>import flash.display.Sprite;
>import flash.system.Capabilities;
>import flash.utils.setInterval;
>
>public class DebugWorker extends Sprite {
>
>    public function DebugWorker() {
>
>        // Stick a timer here so that we will execute script every 1.5s
>        // no matter what.
>        // This is strictly for the debugger to be able to halt.
>        // Note: isDebugger is true only with a Debugger Player.
>        if (Capabilities.isDebugger == true) {
>            setInterval(debugTickler, 1500);
>        }
>    }
>
>    /**
>     *  @private
>     *  This is here so we get the this pointer set to Application.
>     */
>    private function debugTickler():void {
>        // We need some bytes of code in order to have a place to break.
>        var i:int = 0;
>    }
>}
>}
>
>
>Frédéric THOMAS
>
>> From: aharui@adobe.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>> Date: Wed, 30 Apr 2014 16:18:04 +0000
>> 
>> 
>> 
>> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>> 
>> >Could be a solution, you meant like the idleTimer in SystemManager ?
>> Actually, I was referring to debugTickler in Application.as (both mx and
>> spark).
>> 
>> -Alex
>> 
> 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
I created a base class that the workers extend but doesn't seem to work, did I miss something ?

/**
 * User: DoubleFx Date: 30/04/2014 Time: 17:34
 */
package {
import flash.display.Sprite;
import flash.system.Capabilities;
import flash.utils.setInterval;

public class DebugWorker extends Sprite {

    public function DebugWorker() {

        // Stick a timer here so that we will execute script every 1.5s
        // no matter what.
        // This is strictly for the debugger to be able to halt.
        // Note: isDebugger is true only with a Debugger Player.
        if (Capabilities.isDebugger == true) {
            setInterval(debugTickler, 1500);
        }
    }

    /**
     *  @private
     *  This is here so we get the this pointer set to Application.
     */
    private function debugTickler():void {
        // We need some bytes of code in order to have a place to break.
        var i:int = 0;
    }
}
}


Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Wed, 30 Apr 2014 16:18:04 +0000
> 
> 
> 
> On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >Could be a solution, you meant like the idleTimer in SystemManager ?
> Actually, I was referring to debugTickler in Application.as (both mx and
> spark).
> 
> -Alex
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.

On 4/30/14 8:49 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>Could be a solution, you meant like the idleTimer in SystemManager ?
Actually, I was referring to debugTickler in Application.as (both mx and
spark).

-Alex


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Could be a solution, you meant like the idleTimer in SystemManager ?

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Wed, 30 Apr 2014 15:28:26 +0000
> 
> 
> 
> On 4/30/14 8:15 AM, "Alexander Doroshko"
> <al...@jetbrains.com> wrote:
> 
> >On 30.04.2014 17:30, Frédéric THOMAS wrote:
> >>> Why to put some BP in on the suspended ones ?
> >> I meant : Why to put some BP only in the suspended ones ?
> >You are right, suspending all running workers that contain the file,
> >setting breakpoint there (and probably resuming?) seems to be the best.
> >Unfortunately some workers may fail to suspend if they are doing
> >nothing. In the latter case breakpoint could be remembered and set when
> >worker gets anything to do.
> I'm not fully following this thread, but I saw this and wanted to point
> out that the Flex SDK puts a timer in every app so FDB has something to
> stop on.  Maybe we should create a "Worker" base class with a similar
> timer.
> 
> -Alex
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.

On 4/30/14 8:15 AM, "Alexander Doroshko"
<al...@jetbrains.com> wrote:

>On 30.04.2014 17:30, Frédéric THOMAS wrote:
>>> Why to put some BP in on the suspended ones ?
>> I meant : Why to put some BP only in the suspended ones ?
>You are right, suspending all running workers that contain the file,
>setting breakpoint there (and probably resuming?) seems to be the best.
>Unfortunately some workers may fail to suspend if they are doing
>nothing. In the latter case breakpoint could be remembered and set when
>worker gets anything to do.
I'm not fully following this thread, but I saw this and wanted to point
out that the Flex SDK puts a timer in every app so FDB has something to
stop on.  Maybe we should create a "Worker" base class with a similar
timer.

-Alex


Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
P.S. I have some extra days off this week and will be able to continue
discussion only on Monday.

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Ah I guess I see your point now, correct me if I'm wrong, you have the need to be able set a BP before the next break event, right ?

If it is the case, not sure I can do many things, I don't think I can catch a worker status change until I receive a myself break event, I check it though.
I plan B is quite awful, it would be you would wait for the next break event and set the BPs as you do it usually but it means as well that 1 occurence of the break event on this BP might be uncaught if the BP is set before the next already registered to break.

Frédéric THOMAS

> Date: Wed, 30 Apr 2014 19:24:58 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 30.04.2014 19:20, Frédéric THOMAS wrote:
> >
> >> You are right, suspending all running workers that contain the file,
> >> setting breakpoint there (and probably resuming?) seems to be the best.
> > Sure resuming it if I halted it.
> >
> >> Unfortunately some workers may fail to suspend if they are doing
> >> nothing. In the latter case breakpoint could be remembered and set when
> >> worker gets anything to do.
> > If you have an example of that behavior, give it to me please as I guess in that case, I can still set the BP, etc.. without the need to halt it or to be more precise after it failed to halt.
> BackWorker in the example we played with can't be halted unless you 
> select a file for it in the main thread. You reproduced it yourself 
> yesterday when you wrote following:
> > Bug 2: Can't halt the player execution, it tells me to click a button, 
> > what I do but failed to halt it
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 30.04.2014 19:20, Frédéric THOMAS wrote:
>
>> You are right, suspending all running workers that contain the file,
>> setting breakpoint there (and probably resuming?) seems to be the best.
> Sure resuming it if I halted it.
>
>> Unfortunately some workers may fail to suspend if they are doing
>> nothing. In the latter case breakpoint could be remembered and set when
>> worker gets anything to do.
> If you have an example of that behavior, give it to me please as I guess in that case, I can still set the BP, etc.. without the need to halt it or to be more precise after it failed to halt.
BackWorker in the example we played with can't be halted unless you 
select a file for it in the main thread. You reproduced it yourself 
yesterday when you wrote following:
> Bug 2: Can't halt the player execution, it tells me to click a button, 
> what I do but failed to halt it


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> You are right, suspending all running workers that contain the file,
> setting breakpoint there (and probably resuming?) seems to be the best.

Sure resuming it if I halted it.

> Unfortunately some workers may fail to suspend if they are doing
> nothing. In the latter case breakpoint could be remembered and set when
> worker gets anything to do.

If you have an example of that behavior, give it to me please as I guess in that case, I can still set the BP, etc.. without the need to halt it or to be more precise after it failed to halt.

Frédéric THOMAS

> Date: Wed, 30 Apr 2014 19:15:32 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 30.04.2014 17:30, Frédéric THOMAS wrote:
> >> Why to put some BP in on the suspended ones ?
> > I meant : Why to put some BP only in the suspended ones ?
> You are right, suspending all running workers that contain the file,
> setting breakpoint there (and probably resuming?) seems to be the best.
> Unfortunately some workers may fail to suspend if they are doing
> nothing. In the latter case breakpoint could be remembered and set when
> worker gets anything to do.
> > Also, the compiled FDB attached to the fixed issue is more up to date than the last one I sent you, I re-applied the mxml BP fix on it.
> That's what I played with.
> 
> Alexander
> > Frédéric THOMAS
> >
> >> From: webdoublefx@hotmail.com
> >> To: dev@flex.apache.org
> >> Subject: RE: [FDB] Integration
> >> Date: Wed, 30 Apr 2014 14:21:45 +0100
> >>
> >>>> I created 2 tickets [1] for the merge, [2] for the fix, I 
> >> attached it the fixed FDB. Main thread with the target file is not 
> >> paused
> >>> Switching workers when VM is paused after new worker creation seems to 
> >>> work now, that' great!
> >>> Setting a breakpoint to the file that is not loaded yet and will be 
> >>> loaded later by a new worker also seems to work, that's even more cool!
> >>
> >> Yep :-)
> >>
> >>> I still see the issue with setting a breakpoint in incorrect file when 
> >>> all workers are loaded but the file belongs to non active one. See [1]
> >>>> Next steps:
> >>>> 1- Fix the bad message when a file is not found
> >>> What do you mean?
> >>
> >> It seems I meant just what you said:
> >>> I still see the issue with setting a breakpoint in incorrect file when 
> >>> all workers are loaded but the file belongs to non active one. See [1]
> >>
> >> But I reduced my sentence to the message:
> >>> Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE
> >>
> >>>> BTW IntelliJ uses only breakpoints, no watches and displays.
> >>
> >> I will still need to apply the same logic to each potential command that could have the same issue.
> >>
> >>> - 'break' command may be called with file name or with file id. If it is 
> >>> called with file id then probably the right thing is to apply the 
> >>> command to the current worker only
> >>
> >> Good point, I keep that !
> >>
> >>> - the same file may belong to several workers. So probably fdb should 
> >>> iterate all suspended workers and try to set the breakpoint for all that 
> >>> contain this file.
> >>
> >> I would have suspended all workers instead and place a BP in each if it belongs to.
> >> Why to put some BP in on the suspended ones ?
> >>
> >>> - new workers that contain this file may appear later. And each existing 
> >>> worker that doesn't contain the file may get new bytecode loaded with 
> >>> this file. So despite of the result of the previous attempts fdb should 
> >>> remember the breakpoint location and try to set it for all new workers 
> >>> that appear later. Also each time when new code is loaded fdb should try 
> >>> to set breakpoint again for each existing worker that didn't contain the 
> >>> file before.
> >>
> >> Yep, was my goal too.
> Cool!
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 30.04.2014 17:30, Frédéric THOMAS wrote:
>> Why to put some BP in on the suspended ones ?
> I meant : Why to put some BP only in the suspended ones ?
You are right, suspending all running workers that contain the file,
setting breakpoint there (and probably resuming?) seems to be the best.
Unfortunately some workers may fail to suspend if they are doing
nothing. In the latter case breakpoint could be remembered and set when
worker gets anything to do.
> Also, the compiled FDB attached to the fixed issue is more up to date than the last one I sent you, I re-applied the mxml BP fix on it.
That's what I played with.

Alexander
> Frédéric THOMAS
>
>> From: webdoublefx@hotmail.com
>> To: dev@flex.apache.org
>> Subject: RE: [FDB] Integration
>> Date: Wed, 30 Apr 2014 14:21:45 +0100
>>
>>>> I created 2 tickets [1] for the merge, [2] for the fix, I 
>> attached it the fixed FDB. Main thread with the target file is not 
>> paused
>>> Switching workers when VM is paused after new worker creation seems to 
>>> work now, that' great!
>>> Setting a breakpoint to the file that is not loaded yet and will be 
>>> loaded later by a new worker also seems to work, that's even more cool!
>>
>> Yep :-)
>>
>>> I still see the issue with setting a breakpoint in incorrect file when 
>>> all workers are loaded but the file belongs to non active one. See [1]
>>>> Next steps:
>>>> 1- Fix the bad message when a file is not found
>>> What do you mean?
>>
>> It seems I meant just what you said:
>>> I still see the issue with setting a breakpoint in incorrect file when 
>>> all workers are loaded but the file belongs to non active one. See [1]
>>
>> But I reduced my sentence to the message:
>>> Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE
>>
>>>> BTW IntelliJ uses only breakpoints, no watches and displays.
>>
>> I will still need to apply the same logic to each potential command that could have the same issue.
>>
>>> - 'break' command may be called with file name or with file id. If it is 
>>> called with file id then probably the right thing is to apply the 
>>> command to the current worker only
>>
>> Good point, I keep that !
>>
>>> - the same file may belong to several workers. So probably fdb should 
>>> iterate all suspended workers and try to set the breakpoint for all that 
>>> contain this file.
>>
>> I would have suspended all workers instead and place a BP in each if it belongs to.
>> Why to put some BP in on the suspended ones ?
>>
>>> - new workers that contain this file may appear later. And each existing 
>>> worker that doesn't contain the file may get new bytecode loaded with 
>>> this file. So despite of the result of the previous attempts fdb should 
>>> remember the breakpoint location and try to set it for all new workers 
>>> that appear later. Also each time when new code is loaded fdb should try 
>>> to set breakpoint again for each existing worker that didn't contain the 
>>> file before.
>>
>> Yep, was my goal too.
Cool!

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Why to put some BP in on the suspended ones ?
I meant : Why to put some BP only in the suspended ones ?

Also, the compiled FDB attached to the fixed issue is more up to date than the last one I sent you, I re-applied the mxml BP fix on it.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Wed, 30 Apr 2014 14:21:45 +0100
> 
> > > I created 2 tickets [1] for the merge, [2] for the fix, I 
> attached it the fixed FDB. Main thread with the target file is not 
> paused
> > Switching workers when VM is paused after new worker creation seems to 
> > work now, that' great!
> > Setting a breakpoint to the file that is not loaded yet and will be 
> > loaded later by a new worker also seems to work, that's even more cool!
> 
> Yep :-)
> 
> > I still see the issue with setting a breakpoint in incorrect file when 
> > all workers are loaded but the file belongs to non active one. See [1]
> > > Next steps:
> > > 1- Fix the bad message when a file is not found
> > What do you mean?
> 
> It seems I meant just what you said:
> > I still see the issue with setting a breakpoint in incorrect file when 
> > all workers are loaded but the file belongs to non active one. See [1]
> 
> But I reduced my sentence to the message:
> > Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE
> 
> > > BTW IntelliJ uses only breakpoints, no watches and displays.
> 
> I will still need to apply the same logic to each potential command that could have the same issue.
> 
> > - 'break' command may be called with file name or with file id. If it is 
> > called with file id then probably the right thing is to apply the 
> > command to the current worker only
> 
> Good point, I keep that !
> 
> > - the same file may belong to several workers. So probably fdb should 
> > iterate all suspended workers and try to set the breakpoint for all that 
> > contain this file.
> 
> I would have suspended all workers instead and place a BP in each if it belongs to.
> Why to put some BP in on the suspended ones ?
> 
> > - new workers that contain this file may appear later. And each existing 
> > worker that doesn't contain the file may get new bytecode loaded with 
> > this file. So despite of the result of the previous attempts fdb should 
> > remember the breakpoint location and try to set it for all new workers 
> > that appear later. Also each time when new code is loaded fdb should try 
> > to set breakpoint again for each existing worker that didn't contain the 
> > file before.
> 
> Yep, was my goal too.
> 
> Frédéric THOMAS
> 
> > Date: Wed, 30 Apr 2014 15:37:38 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > On 30.04.2014 14:14, Frédéric THOMAS wrote:
> > > I created 2 tickets [1] for the merge, [2] for the fix, I attached it the fixed FDB. Main thread with the target file is not paused
> > Switching workers when VM is paused after new worker creation seems to 
> > work now, that' great!
> > Setting a breakpoint to the file that is not loaded yet and will be 
> > loaded later by a new worker also seems to work, that's even more cool!
> > I still see the issue with setting a breakpoint in incorrect file when 
> > all workers are loaded but the file belongs to non active one. See [1]
> > > Next steps:
> > > 1- Fix the bad message when a file is not found
> > What do you mean?
> > > 2- New feature: Automaticaly set back the breakpoints, watches and displays when another instance of the worker is created and the "-ide" argument is passed to FDB
> > The feature needs to be thoroughly thought over. There are too many 
> > cases to keep in mind:
> > - 'break' command may be called with file name or with file id. If it is 
> > called with file id then probably the right thing is to apply the 
> > command to the current worker only
> > - if 'break' command is followed by the file name then still there are a 
> > lot of cases:
> > - definitely fdb should try to find this file in the current worker and 
> > set breakpoint if found
> > - the same file may belong to several workers. So probably fdb should 
> > iterate all suspended workers and try to set the breakpoint for all that 
> > contain this file.
> > - new workers that contain this file may appear later. And each existing 
> > worker that doesn't contain the file may get new bytecode loaded with 
> > this file. So despite of the result of the previous attempts fdb should 
> > remember the breakpoint location and try to set it for all new workers 
> > that appear later. Also each time when new code is loaded fdb should try 
> > to set breakpoint again for each existing worker that didn't contain the 
> > file before.
> > 
> > BTW IntelliJ uses only breakpoints, no watches and displays.
> > 
> > > 3- In the Falcon repo, merge FDB with its classes using the Falcon AST
> > >
> > > Any comments are welcome.
> > >
> > > Frédéric THOMAS
> > >
> > > [1] https://issues.apache.org/jira/browse/FLEX-34291
> > > [2] https://issues.apache.org/jira/browse/FLEX-34292
> > [1]
> > Apache fdb (Flash Player Debugger) [build 20140430]
> > Copyright 2013 The Apache Software Foundation. All rights reserved.
> > (fdb) run
> > Waiting for Player to connect
> > Player connected; session starting.
> > Set breakpoints and then type 'continue' to resume the session.
> > (fdb) c
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175а169 
> > bytes after decompression
> > [WorkerCreate] 1
> > Additional ActionScript code has been loaded from a SWF or a frame.
> > To see all currently loaded files, type 'info files'.
> > Active worker has changed to worker 1
> > 
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) c
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493а264 
> > bytes after decompression
> > halt
> > Do you want to attempt to halt execution? (y or n) y
> > Attempting to halt.
> > To help out, try nudging the Player (e.g. press a button)
> > Execution halted at 0x00009aeb (39659)
> > (fdb) worker 0
> > Active worker has changed to worker Main Thread
> > (fdb) halt
> > Attempting to suspend Player execution...
> > Player stopped
> > (fdb) info workers
> > Main Thread 0 - Suspended (Active)
> > Worker 1 - Suspended
> > (fdb) break BackWorker.as:30
> > Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> > I created 2 tickets [1] for the merge, [2] for the fix, I 
attached it the fixed FDB. Main thread with the target file is not 
paused
> Switching workers when VM is paused after new worker creation seems to 
> work now, that' great!
> Setting a breakpoint to the file that is not loaded yet and will be 
> loaded later by a new worker also seems to work, that's even more cool!

Yep :-)

> I still see the issue with setting a breakpoint in incorrect file when 
> all workers are loaded but the file belongs to non active one. See [1]
> > Next steps:
> > 1- Fix the bad message when a file is not found
> What do you mean?

It seems I meant just what you said:
> I still see the issue with setting a breakpoint in incorrect file when 
> all workers are loaded but the file belongs to non active one. See [1]

But I reduced my sentence to the message:
> Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE

> > BTW IntelliJ uses only breakpoints, no watches and displays.

I will still need to apply the same logic to each potential command that could have the same issue.

> - 'break' command may be called with file name or with file id. If it is 
> called with file id then probably the right thing is to apply the 
> command to the current worker only

Good point, I keep that !

> - the same file may belong to several workers. So probably fdb should 
> iterate all suspended workers and try to set the breakpoint for all that 
> contain this file.

I would have suspended all workers instead and place a BP in each if it belongs to.
Why to put some BP in on the suspended ones ?

> - new workers that contain this file may appear later. And each existing 
> worker that doesn't contain the file may get new bytecode loaded with 
> this file. So despite of the result of the previous attempts fdb should 
> remember the breakpoint location and try to set it for all new workers 
> that appear later. Also each time when new code is loaded fdb should try 
> to set breakpoint again for each existing worker that didn't contain the 
> file before.

Yep, was my goal too.

Frédéric THOMAS

> Date: Wed, 30 Apr 2014 15:37:38 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 30.04.2014 14:14, Frédéric THOMAS wrote:
> > I created 2 tickets [1] for the merge, [2] for the fix, I attached it the fixed FDB. Main thread with the target file is not paused
> Switching workers when VM is paused after new worker creation seems to 
> work now, that' great!
> Setting a breakpoint to the file that is not loaded yet and will be 
> loaded later by a new worker also seems to work, that's even more cool!
> I still see the issue with setting a breakpoint in incorrect file when 
> all workers are loaded but the file belongs to non active one. See [1]
> > Next steps:
> > 1- Fix the bad message when a file is not found
> What do you mean?
> > 2- New feature: Automaticaly set back the breakpoints, watches and displays when another instance of the worker is created and the "-ide" argument is passed to FDB
> The feature needs to be thoroughly thought over. There are too many 
> cases to keep in mind:
> - 'break' command may be called with file name or with file id. If it is 
> called with file id then probably the right thing is to apply the 
> command to the current worker only
> - if 'break' command is followed by the file name then still there are a 
> lot of cases:
> - definitely fdb should try to find this file in the current worker and 
> set breakpoint if found
> - the same file may belong to several workers. So probably fdb should 
> iterate all suspended workers and try to set the breakpoint for all that 
> contain this file.
> - new workers that contain this file may appear later. And each existing 
> worker that doesn't contain the file may get new bytecode loaded with 
> this file. So despite of the result of the previous attempts fdb should 
> remember the breakpoint location and try to set it for all new workers 
> that appear later. Also each time when new code is loaded fdb should try 
> to set breakpoint again for each existing worker that didn't contain the 
> file before.
> 
> BTW IntelliJ uses only breakpoints, no watches and displays.
> 
> > 3- In the Falcon repo, merge FDB with its classes using the Falcon AST
> >
> > Any comments are welcome.
> >
> > Frédéric THOMAS
> >
> > [1] https://issues.apache.org/jira/browse/FLEX-34291
> > [2] https://issues.apache.org/jira/browse/FLEX-34292
> [1]
> Apache fdb (Flash Player Debugger) [build 20140430]
> Copyright 2013 The Apache Software Foundation. All rights reserved.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> (fdb) c
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175а169 
> bytes after decompression
> [WorkerCreate] 1
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> Active worker has changed to worker 1
> 
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) c
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493а264 
> bytes after decompression
> halt
> Do you want to attempt to halt execution? (y or n) y
> Attempting to halt.
> To help out, try nudging the Player (e.g. press a button)
> Execution halted at 0x00009aeb (39659)
> (fdb) worker 0
> Active worker has changed to worker Main Thread
> (fdb) halt
> Attempting to suspend Player execution...
> Player stopped
> (fdb) info workers
> Main Thread 0 - Suspended (Active)
> Worker 1 - Suspended
> (fdb) break BackWorker.as:30
> Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 30.04.2014 14:14, Frédéric THOMAS wrote:
> I created 2 tickets [1] for the merge, [2] for the fix, I attached it the fixed FDB. Main thread with the target file is not paused
Switching workers when VM is paused after new worker creation seems to 
work now, that' great!
Setting a breakpoint to the file that is not loaded yet and will be 
loaded later by a new worker also seems to work, that's even more cool!
I still see the issue with setting a breakpoint in incorrect file when 
all workers are loaded but the file belongs to non active one. See [1]
> Next steps:
> 1- Fix the bad message when a file is not found
What do you mean?
> 2- New feature: Automaticaly set back the breakpoints, watches and displays when another instance of the worker is created and the "-ide" argument is passed to FDB
The feature needs to be thoroughly thought over. There are too many 
cases to keep in mind:
- 'break' command may be called with file name or with file id. If it is 
called with file id then probably the right thing is to apply the 
command to the current worker only
- if 'break' command is followed by the file name then still there are a 
lot of cases:
- definitely fdb should try to find this file in the current worker and 
set breakpoint if found
- the same file may belong to several workers. So probably fdb should 
iterate all suspended workers and try to set the breakpoint for all that 
contain this file.
- new workers that contain this file may appear later. And each existing 
worker that doesn't contain the file may get new bytecode loaded with 
this file. So despite of the result of the previous attempts fdb should 
remember the breakpoint location and try to set it for all new workers 
that appear later. Also each time when new code is loaded fdb should try 
to set breakpoint again for each existing worker that didn't contain the 
file before.

BTW IntelliJ uses only breakpoints, no watches and displays.

> 3- In the Falcon repo, merge FDB with its classes using the Falcon AST
>
> Any comments are welcome.
>
> Frédéric THOMAS
>
> [1] https://issues.apache.org/jira/browse/FLEX-34291
> [2] https://issues.apache.org/jira/browse/FLEX-34292
[1]
Apache fdb (Flash Player Debugger) [build 20140430]
Copyright 2013 The Apache Software Foundation. All rights reserved.
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
(fdb) c
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175а169 
bytes after decompression
[WorkerCreate] 1
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Set additional breakpoints as desired, and then type 'continue'.
(fdb) c
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493а264 
bytes after decompression
halt
Do you want to attempt to halt execution? (y or n) y
Attempting to halt.
To help out, try nudging the Player (e.g. press a button)
Execution halted at 0x00009aeb (39659)
(fdb) worker 0
Active worker has changed to worker Main Thread
(fdb) halt
Attempting to suspend Player execution...
Player stopped
(fdb) info workers
Main Thread 0 - Suspended (Active)
Worker 1 - Suspended
(fdb) break BackWorker.as:30
Breakpoint 1: file MP3Worker.as, line 30 // WRONG FILE


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
I created 2 tickets [1] for the merge, [2] for the fix, I attached it the fixed FDB.

Next steps:
1- Fix the bad message when a file is not found
2- New feature: Automaticaly set back the breakpoints, watches and displays when another instance of the worker is created and the "-ide" argument is passed to FDB
3- In the Falcon repo, merge FDB with its classes using the Falcon AST

Any comments are welcome.

Frédéric THOMAS

[1] https://issues.apache.org/jira/browse/FLEX-34291
[2] https://issues.apache.org/jira/browse/FLEX-34292

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Wed, 30 Apr 2014 03:16:46 +0000
> 
> 
> 
> On 4/29/14 3:30 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> 
> >So, is there any objection to have one version in the SDK and one in
> >Falcon ?
> I'm ok with that.
> 
> -Alex
> 
> 	 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.

On 4/29/14 3:30 PM, "Frédéric THOMAS" <we...@hotmail.com> wrote:


>So, is there any objection to have one version in the SDK and one in
>Falcon ?
I'm ok with that.

-Alex

	 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
It is possible yes as I did it already but still needs more tests indeed, I still think we can have another version which uses Falcon as the code seems adding more features, I didn't dig that much in it for be able to figure them yet but will try to do it in a near futur.

So, is there any objection to have one version in the SDK and one in Falcon ?

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Tue, 29 Apr 2014 21:35:03 +0000
> 
> Yes, definitely.  If you can get FDB with workers to not need Falcon
> classes that would be great.
> 
> On 4/29/14 10:11 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >If that means users won't be able to debug workers using the SDK until
> >Falcon has been released as part of it, I don't think that a good idea.
> >
> >Instead, can we have 2 versions ? one using the current ASC classes and
> >shipped with the current SDK, the other one in Falcon ?
> >
> >Frédéric THOMAS
> >
> >> From: aharui@adobe.com
> >> To: dev@flex.apache.org
> >> Subject: Re: [FDB] Integration
> >> Date: Tue, 29 Apr 2014 16:41:33 +0000
> >> 
> >> 
> >> 
> >> On 4/29/14 9:35 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >> 
> >> >The integration of the worker code itself which requires, in order to
> >>be
> >> >total, to modify the Ant script that build FDB in order to link the
> >> >Falcon sources (AST classes used to evaluate the expression), at the
> >> >moment I didn't do this part and then still use the old code which
> >> >required some integration code to work, I would like to commit that but
> >> >once the build script modified and everything is working, I will
> >>commit.
> >> >Is it fine for you like that ?
> >> You can check anything you want into the FDBWorkers branch, but IMO, FDB
> >> should not be using Falcon classes when we check it into the main
> >>branch.
> >> An alternate plan would be to make FDB with workers only available as
> >>part
> >> of Falcon and move it to that repo.
> >> -ALex		 	   		  
> >> 
> > 		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
Yes, definitely.  If you can get FDB with workers to not need Falcon
classes that would be great.

On 4/29/14 10:11 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>If that means users won't be able to debug workers using the SDK until
>Falcon has been released as part of it, I don't think that a good idea.
>
>Instead, can we have 2 versions ? one using the current ASC classes and
>shipped with the current SDK, the other one in Falcon ?
>
>Frédéric THOMAS
>
>> From: aharui@adobe.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>> Date: Tue, 29 Apr 2014 16:41:33 +0000
>> 
>> 
>> 
>> On 4/29/14 9:35 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>> 
>> >The integration of the worker code itself which requires, in order to
>>be
>> >total, to modify the Ant script that build FDB in order to link the
>> >Falcon sources (AST classes used to evaluate the expression), at the
>> >moment I didn't do this part and then still use the old code which
>> >required some integration code to work, I would like to commit that but
>> >once the build script modified and everything is working, I will
>>commit.
>> >Is it fine for you like that ?
>> You can check anything you want into the FDBWorkers branch, but IMO, FDB
>> should not be using Falcon classes when we check it into the main
>>branch.
>> An alternate plan would be to make FDB with workers only available as
>>part
>> of Falcon and move it to that repo.
>> -ALex		 	   		  
>> 
> 		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
If that means users won't be able to debug workers using the SDK until Falcon has been released as part of it, I don't think that a good idea.

Instead, can we have 2 versions ? one using the current ASC classes and shipped with the current SDK, the other one in Falcon ?

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Tue, 29 Apr 2014 16:41:33 +0000
> 
> 
> 
> On 4/29/14 9:35 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >The integration of the worker code itself which requires, in order to be
> >total, to modify the Ant script that build FDB in order to link the
> >Falcon sources (AST classes used to evaluate the expression), at the
> >moment I didn't do this part and then still use the old code which
> >required some integration code to work, I would like to commit that but
> >once the build script modified and everything is working, I will commit.
> >Is it fine for you like that ?
> You can check anything you want into the FDBWorkers branch, but IMO, FDB
> should not be using Falcon classes when we check it into the main branch.
> An alternate plan would be to make FDB with workers only available as part
> of Falcon and move it to that repo.
> -ALex		 	   		  
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.

On 4/29/14 9:35 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:

>The integration of the worker code itself which requires, in order to be
>total, to modify the Ant script that build FDB in order to link the
>Falcon sources (AST classes used to evaluate the expression), at the
>moment I didn't do this part and then still use the old code which
>required some integration code to work, I would like to commit that but
>once the build script modified and everything is working, I will commit.
>Is it fine for you like that ?
You can check anything you want into the FDBWorkers branch, but IMO, FDB
should not be using Falcon classes when we check it into the main branch.
An alternate plan would be to make FDB with workers only available as part
of Falcon and move it to that repo.
-ALex		 	   		  


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
I meant: 
I wouldn't like to commit that in this state.
Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Tue, 29 Apr 2014 17:35:50 +0100
> 
> The integration of the worker code itself which requires, in order to be total, to modify the Ant script that build FDB in order to link the Falcon sources (AST classes used to evaluate the expression), at the moment I didn't do this part and then still use the old code which required some integration code to work, I would like to commit that but once the build script modified and everything is working, I will commit. Is it fine for you like that ?
> 
> Bugs: I finally been able to reproduce the ones mentioned by Alexander but I'm not sure the back and forth discussion have some big interess, anyway, that's something that will go soon in JIRA
> 
> Frédéric THOMAS
> 
> > From: aharui@adobe.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > Date: Tue, 29 Apr 2014 16:23:38 +0000
> > 
> > IMO, unless the discussion is going to cover proprietary aspects of
> > IntelliJ, it might be more like the "Apache Way" to share the code in a
> > git branch and continue to discuss on the list.
> > 
> > On 4/29/14 8:03 AM, "Alexander Doroshko"
> > <al...@jetbrains.com> wrote:
> > 
> > >Yes, I'd gladly try it. We can switch to personal emails in order not to
> > >spam the list.
> > >
> > >On 29.04.2014 18:34, Frédéric THOMAS wrote:
> > >> Hi Alexander,
> > >>
> > >> I downloaded the files you indicated me + some missing files (UI,
> > >>ShineMP3, metallica.wav), created an IntelliJ project, build and run
> > >>successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my
> > >>version of FDB and was unable to reproduce both of the issues, it worked
> > >>as expected, so, that's a good news.
> > >>
> > >> Also, not on this test app but on another one [1], I've been able to
> > >>set a BP on the worker using IntelliJ once the worker has been loaded
> > >>but the variables was not readable and futur stops to the BP didn't
> > >>work, IJ shows up the SystemManager class instead.
> > >>
> > >> If you are interested to test my version, just tell me and I will send
> > >>it to you.
> > >>
> > >> Unfortunately, I haven't been able to work on it yesterday but will
> > >>continue tonight.
> > >>
> > >> Frédéric THOMAS
> > >>
> > >> [1] https://github.com/doublefx/downloadFileWorker
> > >>
> > >>
> > >>> Date: Tue, 29 Apr 2014 15:25:23 +0400
> > >>> From: alexander.doroshko@jetbrains.com
> > >>> To: dev@flex.apache.org
> > >>> Subject: Re: [FDB] Integration
> > >>>
> > >>> Hi Frédéric,
> > >>> that's great that you are ready to put the effort into fdb with workers
> > >>> support!
> > >>>
> > >>> I have to say that IntelliJ IDEA still doesn't support debugging apps
> > >>> with workers. I spent some time on it but faced some bugs in fdb that
> > >>> were not that easy to workaround. That's not an excuse for me and I
> > >>>hope
> > >>> to finally support workers debug in the next version. Luckily fdb is
> > >>>not
> > >>> a black box for me any more.
> > >>>
> > >>> Below are some of the bugs that I faced. I played with this project:
> > >>> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains
> > >>> already compiled MP3Worker.swf which is the main app.
> > >>>
> > >>> 1. When the worker is loaded it is impossible to switch to main thread
> > >>> using 'worker 0' command. Fdb says that active worker has changed but
> > >>> asking 'info workers' again says that actually it hasn't. See listing
> > >>>[1].
> > >>>
> > >>> 2. More important bug for the IDE integration is inability to set
> > >>> breakpoint without knowing file id. Files that belong to different
> > >>> workers may have the same id. When I ask to set a breakpoint in a file
> > >>> with given name but current active worker doesn't have file with this
> > >>> name then fdb sets the breakpoint inside completely different file that
> > >>> does belong to the current worker and has the same id as the file where
> > >>> I asked to set breakpoint. See listing [2].
> > >>>
> > >>> Alexander
> > >>>
> > >>> [1]
> > >>>
> > >>> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
> > >>> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false
> > >>>-Xms32m -Xmx512m
> > >>>-Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar
> > >>>"C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
> > >>> Adobe fdb (Flash Player Debugger) [build development]
> > >>> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> > >>> (fdb) run
> > >>> Waiting for Player to connect
> > >>> Player connected; session starting.
> > >>> Set breakpoints and then type 'continue' to resume the session.
> > >>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
> > >>>175?169 bytes after decompression
> > >>> (fdb) c
> > >>> [WorkerCreate] 1
> > >>> Additional ActionScript code has been loaded from a SWF or a frame.
> > >>> To see all currently loaded files, type 'info files'.
> > >>> Active worker has changed to worker 1
> > >>> Set additional breakpoints as desired, and then type 'continue'.
> > >>> (fdb) info workers
> > >>> Main Thread 0 - Running
> > >>> Worker 1 - Suspended (Active)
> > >>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
> > >>>493?264 bytes after decompression
> > >>> Set additional breakpoints as desired, and then type 'continue'.
> > >>> (fdb) worker 0
> > >>> *Active worker has changed to worker Main Thread*
> > >>> Set additional breakpoints as desired, and then type 'continue'.
> > >>> (fdb) info workers
> > >>> *Main Thread 0 - Running*
> > >>> *Worker 1 - Suspended (Active)**
> > >>> *Set additional breakpoints as desired, and then type 'continue'.
> > >>> (fdb)
> > >>>
> > >>> [2]
> > >>>
> > >>> ...
> > >>> (fdb) info workers
> > >>> Main Thread 0 - Suspended (Active)
> > >>> Worker 1 - Suspended
> > >>> (fdb) show files
> > >>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
> > >>>4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
> > >>> 2 /Users/leebrimelow/Documents/Adobe Flash Builder
> > >>>4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
> > >>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
> > >>>4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
> > >>> 2 
> > >>>/Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encode
> > >>>r.as, ShineMP3Encoder.as (Worker 1)
> > >>> *(fdb) break BackWorker.as:26**
> > >>> **Breakpoint 2: file MP3Worker.as, line 26**
> > >>> *(fdb)
> > >>>
> > >>>
> > >>> On 27.04.2014 4:01, Frédéric THOMAS wrote:
> > >>>> Hi,
> > >>>>
> > >>>> To resume a bit what I did and discover today:
> > >>>>
> > >>>> 1- I merged the donated code to the the current FDB, keeping the
> > >>>>existing fixes and the current ExpressionEvaluator (I guess It is
> > >>>>possible to use the new Falcon based implementation modifying the ANT
> > >>>>script which builds it, in order to link the Falcon sources).
> > >>>>
> > >>>> 2- The new commands are "worker <workerID>" used to select a
> > >>>>parlicular worker by its ID and "info workers", this is an example of
> > >>>>what gives a break inside a worker and what displays the 2 commands :
> > >>>>
> > >>>> (fdb) info workers
> > >>>> !mainThread! 0 - !workerRunning!
> > >>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> > >>>>
> > >>>> (fdb) worker 0
> > >>>> !workerChanged! !mainThread!
> > >>>>
> > >>>> (fdb) info workers
> > >>>> !mainThread! 0 - !workerRunning! !workerSelected!
> > >>>> !inWorker! {worker=1} - !workerSuspended!
> > >>>>
> > >>>> (fdb) worker 1
> > >>>> !workerChanged! 1
> > >>>>
> > >>>> (fdb) info workers
> > >>>> !mainThread! 0 - !workerRunning!
> > >>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> > >>>>
> > >>>> Note for IDE integration:
> > >>>>
> > >>>> 1- At the moment, watch, displays and breakpoints are set for 1
> > >>>>particular worker, it means, they need to be defined again when a
> > >>>>worker starts.
> > >>>> 2- "info breakpoints" does well display the breakpoints for the same
> > >>>>line and on different worker of the same class but without the
> > >>>>relative worker ID (I guess it could be easily fixed)
> > >>>>
> > >>>> I'll be back on it on Monday.
> > >>>>
> > >>>> Frédéric THOMAS 		 	   		
> > >>   		 	   		
> > >
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
The integration of the worker code itself which requires, in order to be total, to modify the Ant script that build FDB in order to link the Falcon sources (AST classes used to evaluate the expression), at the moment I didn't do this part and then still use the old code which required some integration code to work, I would like to commit that but once the build script modified and everything is working, I will commit. Is it fine for you like that ?

Bugs: I finally been able to reproduce the ones mentioned by Alexander but I'm not sure the back and forth discussion have some big interess, anyway, that's something that will go soon in JIRA

Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> Date: Tue, 29 Apr 2014 16:23:38 +0000
> 
> IMO, unless the discussion is going to cover proprietary aspects of
> IntelliJ, it might be more like the "Apache Way" to share the code in a
> git branch and continue to discuss on the list.
> 
> On 4/29/14 8:03 AM, "Alexander Doroshko"
> <al...@jetbrains.com> wrote:
> 
> >Yes, I'd gladly try it. We can switch to personal emails in order not to
> >spam the list.
> >
> >On 29.04.2014 18:34, Frédéric THOMAS wrote:
> >> Hi Alexander,
> >>
> >> I downloaded the files you indicated me + some missing files (UI,
> >>ShineMP3, metallica.wav), created an IntelliJ project, build and run
> >>successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my
> >>version of FDB and was unable to reproduce both of the issues, it worked
> >>as expected, so, that's a good news.
> >>
> >> Also, not on this test app but on another one [1], I've been able to
> >>set a BP on the worker using IntelliJ once the worker has been loaded
> >>but the variables was not readable and futur stops to the BP didn't
> >>work, IJ shows up the SystemManager class instead.
> >>
> >> If you are interested to test my version, just tell me and I will send
> >>it to you.
> >>
> >> Unfortunately, I haven't been able to work on it yesterday but will
> >>continue tonight.
> >>
> >> Frédéric THOMAS
> >>
> >> [1] https://github.com/doublefx/downloadFileWorker
> >>
> >>
> >>> Date: Tue, 29 Apr 2014 15:25:23 +0400
> >>> From: alexander.doroshko@jetbrains.com
> >>> To: dev@flex.apache.org
> >>> Subject: Re: [FDB] Integration
> >>>
> >>> Hi Frédéric,
> >>> that's great that you are ready to put the effort into fdb with workers
> >>> support!
> >>>
> >>> I have to say that IntelliJ IDEA still doesn't support debugging apps
> >>> with workers. I spent some time on it but faced some bugs in fdb that
> >>> were not that easy to workaround. That's not an excuse for me and I
> >>>hope
> >>> to finally support workers debug in the next version. Luckily fdb is
> >>>not
> >>> a black box for me any more.
> >>>
> >>> Below are some of the bugs that I faced. I played with this project:
> >>> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains
> >>> already compiled MP3Worker.swf which is the main app.
> >>>
> >>> 1. When the worker is loaded it is impossible to switch to main thread
> >>> using 'worker 0' command. Fdb says that active worker has changed but
> >>> asking 'info workers' again says that actually it hasn't. See listing
> >>>[1].
> >>>
> >>> 2. More important bug for the IDE integration is inability to set
> >>> breakpoint without knowing file id. Files that belong to different
> >>> workers may have the same id. When I ask to set a breakpoint in a file
> >>> with given name but current active worker doesn't have file with this
> >>> name then fdb sets the breakpoint inside completely different file that
> >>> does belong to the current worker and has the same id as the file where
> >>> I asked to set breakpoint. See listing [2].
> >>>
> >>> Alexander
> >>>
> >>> [1]
> >>>
> >>> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
> >>> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false
> >>>-Xms32m -Xmx512m
> >>>-Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar
> >>>"C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
> >>> Adobe fdb (Flash Player Debugger) [build development]
> >>> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> >>> (fdb) run
> >>> Waiting for Player to connect
> >>> Player connected; session starting.
> >>> Set breakpoints and then type 'continue' to resume the session.
> >>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
> >>>175?169 bytes after decompression
> >>> (fdb) c
> >>> [WorkerCreate] 1
> >>> Additional ActionScript code has been loaded from a SWF or a frame.
> >>> To see all currently loaded files, type 'info files'.
> >>> Active worker has changed to worker 1
> >>> Set additional breakpoints as desired, and then type 'continue'.
> >>> (fdb) info workers
> >>> Main Thread 0 - Running
> >>> Worker 1 - Suspended (Active)
> >>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
> >>>493?264 bytes after decompression
> >>> Set additional breakpoints as desired, and then type 'continue'.
> >>> (fdb) worker 0
> >>> *Active worker has changed to worker Main Thread*
> >>> Set additional breakpoints as desired, and then type 'continue'.
> >>> (fdb) info workers
> >>> *Main Thread 0 - Running*
> >>> *Worker 1 - Suspended (Active)**
> >>> *Set additional breakpoints as desired, and then type 'continue'.
> >>> (fdb)
> >>>
> >>> [2]
> >>>
> >>> ...
> >>> (fdb) info workers
> >>> Main Thread 0 - Suspended (Active)
> >>> Worker 1 - Suspended
> >>> (fdb) show files
> >>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
> >>>4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
> >>> 2 /Users/leebrimelow/Documents/Adobe Flash Builder
> >>>4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
> >>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
> >>>4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
> >>> 2 
> >>>/Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encode
> >>>r.as, ShineMP3Encoder.as (Worker 1)
> >>> *(fdb) break BackWorker.as:26**
> >>> **Breakpoint 2: file MP3Worker.as, line 26**
> >>> *(fdb)
> >>>
> >>>
> >>> On 27.04.2014 4:01, Frédéric THOMAS wrote:
> >>>> Hi,
> >>>>
> >>>> To resume a bit what I did and discover today:
> >>>>
> >>>> 1- I merged the donated code to the the current FDB, keeping the
> >>>>existing fixes and the current ExpressionEvaluator (I guess It is
> >>>>possible to use the new Falcon based implementation modifying the ANT
> >>>>script which builds it, in order to link the Falcon sources).
> >>>>
> >>>> 2- The new commands are "worker <workerID>" used to select a
> >>>>parlicular worker by its ID and "info workers", this is an example of
> >>>>what gives a break inside a worker and what displays the 2 commands :
> >>>>
> >>>> (fdb) info workers
> >>>> !mainThread! 0 - !workerRunning!
> >>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >>>>
> >>>> (fdb) worker 0
> >>>> !workerChanged! !mainThread!
> >>>>
> >>>> (fdb) info workers
> >>>> !mainThread! 0 - !workerRunning! !workerSelected!
> >>>> !inWorker! {worker=1} - !workerSuspended!
> >>>>
> >>>> (fdb) worker 1
> >>>> !workerChanged! 1
> >>>>
> >>>> (fdb) info workers
> >>>> !mainThread! 0 - !workerRunning!
> >>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >>>>
> >>>> Note for IDE integration:
> >>>>
> >>>> 1- At the moment, watch, displays and breakpoints are set for 1
> >>>>particular worker, it means, they need to be defined again when a
> >>>>worker starts.
> >>>> 2- "info breakpoints" does well display the breakpoints for the same
> >>>>line and on different worker of the same class but without the
> >>>>relative worker ID (I guess it could be easily fixed)
> >>>>
> >>>> I'll be back on it on Monday.
> >>>>
> >>>> Frédéric THOMAS 		 	   		
> >>   		 	   		
> >
> 
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Alexander,

I found a way to fix them all except the bad message when a file is not found but it is an easy fix I can think about later.

You can now select a worker, then you need to halt it if is not, set your breakpoints, watches, displays, continue it if you halted it, this bring you back to the previous selected worker, then continue it [1].

Is this behavior fine for you ?

I send you in 5mn the fixed FDB for test but will commit the fix as part of a JIRA issue, you can create it if you like and link it here.

I understand it would be also convenient to set again automaticaly the breakpoints, watches and displays when a new worker of the same instance starts but I wouldn't like to remove the actual behavior, therefore, if it is ok for you, I will activate it only when the "-ide" argument is passed to FDB, I'll do that after the first commits.

Frédéric THOMAS

[1]
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
(fdb) run
Session already in progress
[SWF] MP3Worker.swf - 175 899 bytes after decompression
(fdb) continue
[WorkerCreate] 1
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Set additional breakpoints as desired, and then type 'continue'.
(fdb) info workers
Main Thread 0 - Running
Worker 1 - Suspended (Active)
[SWF] MP3Worker.swf - 493 264 bytes after decompression
Set additional breakpoints as desired, and then type 'continue'.
(fdb) break BackWorker.as:27
Breakpoint 1: file BackWorker.as, line 27
Set additional breakpoints as desired, and then type 'continue'.
(fdb) worker 0
Active worker has changed to worker Main Thread
(fdb) info workers
Main Thread 0 - Running (Active)
Worker 1 - Suspended
(fdb) halt
Attempting to suspend Player execution...
Player stopped
(fdb) break MP3Worker.as:70
Breakpoint 2: file MP3Worker.as, line 70
(fdb) continue
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Set additional breakpoints as desired, and then type 'continue'.
(fdb) info workers
Main Thread 0 - Running
Worker 1 - Suspended (Active)
Set additional breakpoints as desired, and then type 'continue'.
(fdb) info breakpoints
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x0000fa71 in onMainToBack() at BackWorker.as:27
2   breakpoint     keep y   0x00000000 in onSelected() at MP3Worker.as:70
Set additional breakpoints as desired, and then type 'continue'.
(fdb) continue

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: [FDB] Integration
> Date: Tue, 29 Apr 2014 20:32:08 +0100
> 
> > Trying to open any file 
> > triggers event at worker side and it halts. By the way that's a problem 
> > as well for the IDE integration: to set breakpoint it needs to suspend 
> > VM which is not possible if no events are fired. I'm not sure you can do 
> > anything with it at fdb side. But I think you can fix fdb so that it 
> > doesn't set breakpoint in the file where it was not asked to.
> 
> I've seen in the code where the problem comes from but not sure yet how to fix it without to break something, the best is to raise a JIRA like that I can be back on it after the initial commit.
> 
> 
> > The best would be to check all workers suspended at the moment and set 
> > breakpoints for each of them that contains this file.
> > If none found then the same message as for unresolved breakpoint is 
> > probably ok.
> 
> Will check that as well.
> 
> Thanks for pointing that out !
> 
> Frédéric THOMAS
> 
> > Date: Tue, 29 Apr 2014 20:53:28 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: [FDB] Integration
> > 
> > On 29.04.2014 20:23, Alex Harui wrote:
> > > IMO, unless the discussion is going to cover proprietary aspects of
> > > IntelliJ, it might be more like the "Apache Way" to share the code in a
> > > git branch and continue to discuss on the list.
> > No secrets of course. Ok, continuing here.
> > 
> > 
> > Frédéric THOMAS wrote:
> > 
> > > Also line 26 of BackWorker.as, there's no code, when I have the worker 
> > > 1 selected and break at this line it tells that to me, which is true 
> > > and if I do a *BackWorker.as:27 *it breaks.
> > Yes, if the file is there for the current active worker which is 
> > suspended, then it works. Too many ifs. The real problem is setting 
> > breakpoints BEFORE the code is loaded. Fdb says that breakpoint is not 
> > yet resolved and it may be resolved later to the incorrect file or not 
> > resolved at all. Example for the latter case (the same command failed 
> > for the first time and succeeded the second time):
> > 
> > Adobe fdb (Flash Player Debugger) [build 20140426]
> > Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> > (fdb) run
> > Waiting for Player to connect
> > Player connected; session starting.
> > Set breakpoints and then type 'continue' to resume the session.
> > (fdb) break BackWorker.as:27
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 
> > bytes after decompression
> > Breakpoint 1 created, but not yet resolved.
> > The breakpoint will be resolved when the corresponding file or function 
> > is loaded.
> > (fdb) c
> > [WorkerCreate] 1
> > Additional ActionScript code has been loaded from a SWF or a frame.
> > To see all currently loaded files, type 'info files'.
> > Active worker has changed to worker 1
> > 
> > Attempting to resolve breakpoint 1, expression "BackWorker.as:27":
> > There is no executable code on the specified line.
> > Fix or remove bad breakpoints, then type 'continue'.
> > (fdb) break BackWorker.as:27
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 
> > bytes after decompression
> > Breakpoint 2: file BackWorker.as, line 27
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb)
> > 
> > >
> > > Bug 1: reproduced. (will check what I can do)
> > >
> > > Bug 2: Can't halt the player execution, it tells me to click a button, 
> > > what I do but failed to halt it, anyway, I think it is the way it 
> > > works at the end, I mean each command is sent to a particular worker 
> > > session, so, inside the same worker session it hasn't access to the 
> > > others, also the reason why in each instance of the worker we need to 
> > > set back the BP, watches and displays.
> > >
> > > What I can try to do instead is to display a message that the file has 
> > > not been found.
> > To halt worker some event must be triggered there. Pressing a button 
> > won't help as UI belongs to the main thread. Trying to open any file 
> > triggers event at worker side and it halts. By the way that's a problem 
> > as well for the IDE integration: to set breakpoint it needs to suspend 
> > VM which is not possible if no events are fired. I'm not sure you can do 
> > anything with it at fdb side. But I think you can fix fdb so that it 
> > doesn't set breakpoint in the file where it was not asked to.
> > The best would be to check all workers suspended at the moment and set 
> > breakpoints for each of them that contains this file.
> > If none found then the same message as for unresolved breakpoint is 
> > probably ok.
> > 
> > >
> > > Any thoughts ?
> > >
> > > Frédéric THOMAS
> > >
> > > ------------------------------------------------------------------------
> > > Date: Tue, 29 Apr 2014 19:48:39 +0400
> > > From: alexander.doroshko@jetbrains.com
> > > To: webdoublefx@hotmail.com
> > > Subject: Re: [FDB] Integration
> > >
> > > All bugs are there unfortunately.
> > > Note that you do not need to download anything else except 
> > > moreworkers.zip and do not need to setup the project in the IDE. Zip 
> > > already contains compiled MP3Worker.swf that you start after typing 
> > > 'run' in fdb console.
> > >
> > > Here's the listing showing both bugs (see comments). Hint: to have 
> > > user readable text instead of placeholders like !workerChanged! you 
> > > need to copy flex/tools/debugger/cli/fdb_*.properties files from 
> > > fdb.jar from the AIR SDK into your fdb.jar.
> > >
> > > Apache fdb (Flash Player Debugger) [build 20140426]
> > > Copyright 2014 The Apache Software Foundation.
> > > (fdb) run
> > > Waiting for Player to connect
> > > Player connected; session starting.
> > > Set breakpoints and then type 'continue' to resume the session.
> > > (fdb) c
> > > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> > > 175?169 bytes after decompression
> > > !linePrefixWhenWorkerCreated! 1
> > > Additional ActionScript code has been loaded from a SWF or a frame.
> > > To see all currently loaded files, type 'info files'.
> > > !workerChanged! 1
> > >
> > > Set additional breakpoints as desired, and then type 'continue'.
> > > (fdb) info workers
> > > !mainThread! 0 - !workerRunning!
> > > *!inWorker! {worker=1} - !workerSuspended! !workerSelected!  // worker 
> > > 1 is active*
> > > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> > > 493?264 bytes after decompression
> > > Set additional breakpoints as desired, and then type 'continue'.
> > > (fdb) worker 0
> > > *!workerChanged! !mainThread!  // fdb says that active worker is now 
> > > mainThread*
> > > Set additional breakpoints as desired, and then type 'continue'.
> > > (fdb) info workers
> > > !mainThread! 0 - !workerRunning!
> > > *!inWorker! {worker=1} - !workerSuspended! !workerSelected!**// but in 
> > > fact worker 1 remains active
> > > *Set additional breakpoints as desired, and then type 'continue'.
> > > (fdb) c
> > > halt
> > > Do you want to attempt to halt execution? (y or n) y
> > > Attempting to halt.
> > > To help out, try nudging the Player (e.g. press a button)
> > > Execution halted at 0x00009aeb (39659)
> > > (fdb) worker 0
> > > !workerChanged! !mainThread!
> > > (fdb) halt
> > > Attempting to suspend Player execution...
> > > Player stopped
> > > (fdb) info workers
> > > !mainThread! 0 - !workerSuspended! !workerSelected!
> > > !inWorker! {worker=1} - !workerSuspended!
> > > (fdb) show files
> > > 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > > 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (!mainThread!)
> > > 2 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > > 4.6/MP3Worker/src/Workers.as, Workers.as (!mainThread!)
> > > 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > > 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (!inWorker! {worker=1})
> > > 2 
> > > /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, 
> > > ShineMP3Encoder.as (!inWorker! {worker=1})
> > > *(fdb) break BackWorker.as:26  // **there's no **BackWorker.as**file 
> > > for active worker (which is mainThread)
> > > Breakpoint 1: file MP3Worker.as, line 26  // fdb sets the breakpoint 
> > > for a different file instead. I think because it also has id=1*
> > > (fdb)
> > >
> > > On 29.04.2014 19:21, Frédéric THOMAS wrote:
> > >
> > >     Hi Alexander,
> > >
> > >     Attached here the fdb.jar, as you can see in the first message of
> > >     the thread, the output is not the same than the AIR fdb version,
> > >     also, keep in mind that on each instance of each worker you need
> > >     to set back the BP, watches and displays (once the worker is loaded).
> > >
> > >     At the moment, I didn't take all the worker code from the
> > >     donation, the code used to evaluate expressions is still the same
> > >     than before, so, I'm not 100% sure my code works perfectly but
> > >     didn't find any bugs yet, the reason I did that is because the new
> > >     implementation is based on the Falcon AST tree and the build
> > >     script we have at the moment doesn't link it, I will work on this
> > >     script soon in order to be able to compile FDB with the new code
> > >     that evaluate the expressions.
> > >
> > >     Please keep me in touch with your experiments as I'm very
> > >     interested and don't hesitate to raise bugs.
> > >
> > >     Thanks,
> > >     Frédéric THOMAS
> > >
> > >
> > 
> > 
>  		 	   		  
 		 	   		  

RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Trying to open any file 
> triggers event at worker side and it halts. By the way that's a problem 
> as well for the IDE integration: to set breakpoint it needs to suspend 
> VM which is not possible if no events are fired. I'm not sure you can do 
> anything with it at fdb side. But I think you can fix fdb so that it 
> doesn't set breakpoint in the file where it was not asked to.

I've seen in the code where the problem comes from but not sure yet how to fix it without to break something, the best is to raise a JIRA like that I can be back on it after the initial commit.


> The best would be to check all workers suspended at the moment and set 
> breakpoints for each of them that contains this file.
> If none found then the same message as for unresolved breakpoint is 
> probably ok.

Will check that as well.

Thanks for pointing that out !

Frédéric THOMAS

> Date: Tue, 29 Apr 2014 20:53:28 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> On 29.04.2014 20:23, Alex Harui wrote:
> > IMO, unless the discussion is going to cover proprietary aspects of
> > IntelliJ, it might be more like the "Apache Way" to share the code in a
> > git branch and continue to discuss on the list.
> No secrets of course. Ok, continuing here.
> 
> 
> Frédéric THOMAS wrote:
> 
> > Also line 26 of BackWorker.as, there's no code, when I have the worker 
> > 1 selected and break at this line it tells that to me, which is true 
> > and if I do a *BackWorker.as:27 *it breaks.
> Yes, if the file is there for the current active worker which is 
> suspended, then it works. Too many ifs. The real problem is setting 
> breakpoints BEFORE the code is loaded. Fdb says that breakpoint is not 
> yet resolved and it may be resolved later to the incorrect file or not 
> resolved at all. Example for the latter case (the same command failed 
> for the first time and succeeded the second time):
> 
> Adobe fdb (Flash Player Debugger) [build 20140426]
> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> (fdb) break BackWorker.as:27
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 
> bytes after decompression
> Breakpoint 1 created, but not yet resolved.
> The breakpoint will be resolved when the corresponding file or function 
> is loaded.
> (fdb) c
> [WorkerCreate] 1
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> Active worker has changed to worker 1
> 
> Attempting to resolve breakpoint 1, expression "BackWorker.as:27":
> There is no executable code on the specified line.
> Fix or remove bad breakpoints, then type 'continue'.
> (fdb) break BackWorker.as:27
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 
> bytes after decompression
> Breakpoint 2: file BackWorker.as, line 27
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb)
> 
> >
> > Bug 1: reproduced. (will check what I can do)
> >
> > Bug 2: Can't halt the player execution, it tells me to click a button, 
> > what I do but failed to halt it, anyway, I think it is the way it 
> > works at the end, I mean each command is sent to a particular worker 
> > session, so, inside the same worker session it hasn't access to the 
> > others, also the reason why in each instance of the worker we need to 
> > set back the BP, watches and displays.
> >
> > What I can try to do instead is to display a message that the file has 
> > not been found.
> To halt worker some event must be triggered there. Pressing a button 
> won't help as UI belongs to the main thread. Trying to open any file 
> triggers event at worker side and it halts. By the way that's a problem 
> as well for the IDE integration: to set breakpoint it needs to suspend 
> VM which is not possible if no events are fired. I'm not sure you can do 
> anything with it at fdb side. But I think you can fix fdb so that it 
> doesn't set breakpoint in the file where it was not asked to.
> The best would be to check all workers suspended at the moment and set 
> breakpoints for each of them that contains this file.
> If none found then the same message as for unresolved breakpoint is 
> probably ok.
> 
> >
> > Any thoughts ?
> >
> > Frédéric THOMAS
> >
> > ------------------------------------------------------------------------
> > Date: Tue, 29 Apr 2014 19:48:39 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: webdoublefx@hotmail.com
> > Subject: Re: [FDB] Integration
> >
> > All bugs are there unfortunately.
> > Note that you do not need to download anything else except 
> > moreworkers.zip and do not need to setup the project in the IDE. Zip 
> > already contains compiled MP3Worker.swf that you start after typing 
> > 'run' in fdb console.
> >
> > Here's the listing showing both bugs (see comments). Hint: to have 
> > user readable text instead of placeholders like !workerChanged! you 
> > need to copy flex/tools/debugger/cli/fdb_*.properties files from 
> > fdb.jar from the AIR SDK into your fdb.jar.
> >
> > Apache fdb (Flash Player Debugger) [build 20140426]
> > Copyright 2014 The Apache Software Foundation.
> > (fdb) run
> > Waiting for Player to connect
> > Player connected; session starting.
> > Set breakpoints and then type 'continue' to resume the session.
> > (fdb) c
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> > 175?169 bytes after decompression
> > !linePrefixWhenWorkerCreated! 1
> > Additional ActionScript code has been loaded from a SWF or a frame.
> > To see all currently loaded files, type 'info files'.
> > !workerChanged! 1
> >
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) info workers
> > !mainThread! 0 - !workerRunning!
> > *!inWorker! {worker=1} - !workerSuspended! !workerSelected!  // worker 
> > 1 is active*
> > [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> > 493?264 bytes after decompression
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) worker 0
> > *!workerChanged! !mainThread!  // fdb says that active worker is now 
> > mainThread*
> > Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) info workers
> > !mainThread! 0 - !workerRunning!
> > *!inWorker! {worker=1} - !workerSuspended! !workerSelected!**// but in 
> > fact worker 1 remains active
> > *Set additional breakpoints as desired, and then type 'continue'.
> > (fdb) c
> > halt
> > Do you want to attempt to halt execution? (y or n) y
> > Attempting to halt.
> > To help out, try nudging the Player (e.g. press a button)
> > Execution halted at 0x00009aeb (39659)
> > (fdb) worker 0
> > !workerChanged! !mainThread!
> > (fdb) halt
> > Attempting to suspend Player execution...
> > Player stopped
> > (fdb) info workers
> > !mainThread! 0 - !workerSuspended! !workerSelected!
> > !inWorker! {worker=1} - !workerSuspended!
> > (fdb) show files
> > 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (!mainThread!)
> > 2 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > 4.6/MP3Worker/src/Workers.as, Workers.as (!mainThread!)
> > 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> > 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (!inWorker! {worker=1})
> > 2 
> > /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, 
> > ShineMP3Encoder.as (!inWorker! {worker=1})
> > *(fdb) break BackWorker.as:26  // **there's no **BackWorker.as**file 
> > for active worker (which is mainThread)
> > Breakpoint 1: file MP3Worker.as, line 26  // fdb sets the breakpoint 
> > for a different file instead. I think because it also has id=1*
> > (fdb)
> >
> > On 29.04.2014 19:21, Frédéric THOMAS wrote:
> >
> >     Hi Alexander,
> >
> >     Attached here the fdb.jar, as you can see in the first message of
> >     the thread, the output is not the same than the AIR fdb version,
> >     also, keep in mind that on each instance of each worker you need
> >     to set back the BP, watches and displays (once the worker is loaded).
> >
> >     At the moment, I didn't take all the worker code from the
> >     donation, the code used to evaluate expressions is still the same
> >     than before, so, I'm not 100% sure my code works perfectly but
> >     didn't find any bugs yet, the reason I did that is because the new
> >     implementation is based on the Falcon AST tree and the build
> >     script we have at the moment doesn't link it, I will work on this
> >     script soon in order to be able to compile FDB with the new code
> >     that evaluate the expressions.
> >
> >     Please keep me in touch with your experiments as I'm very
> >     interested and don't hesitate to raise bugs.
> >
> >     Thanks,
> >     Frédéric THOMAS
> >
> >
> 
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
On 29.04.2014 20:23, Alex Harui wrote:
> IMO, unless the discussion is going to cover proprietary aspects of
> IntelliJ, it might be more like the "Apache Way" to share the code in a
> git branch and continue to discuss on the list.
No secrets of course. Ok, continuing here.


Frédéric THOMAS wrote:

> Also line 26 of BackWorker.as, there's no code, when I have the worker 
> 1 selected and break at this line it tells that to me, which is true 
> and if I do a *BackWorker.as:27 *it breaks.
Yes, if the file is there for the current active worker which is 
suspended, then it works. Too many ifs. The real problem is setting 
breakpoints BEFORE the code is loaded. Fdb says that breakpoint is not 
yet resolved and it may be resolved later to the incorrect file or not 
resolved at all. Example for the latter case (the same command failed 
for the first time and succeeded the second time):

Adobe fdb (Flash Player Debugger) [build 20140426]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
(fdb) break BackWorker.as:27
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 
bytes after decompression
Breakpoint 1 created, but not yet resolved.
The breakpoint will be resolved when the corresponding file or function 
is loaded.
(fdb) c
[WorkerCreate] 1
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1

Attempting to resolve breakpoint 1, expression "BackWorker.as:27":
There is no executable code on the specified line.
Fix or remove bad breakpoints, then type 'continue'.
(fdb) break BackWorker.as:27
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 
bytes after decompression
Breakpoint 2: file BackWorker.as, line 27
Set additional breakpoints as desired, and then type 'continue'.
(fdb)

>
> Bug 1: reproduced. (will check what I can do)
>
> Bug 2: Can't halt the player execution, it tells me to click a button, 
> what I do but failed to halt it, anyway, I think it is the way it 
> works at the end, I mean each command is sent to a particular worker 
> session, so, inside the same worker session it hasn't access to the 
> others, also the reason why in each instance of the worker we need to 
> set back the BP, watches and displays.
>
> What I can try to do instead is to display a message that the file has 
> not been found.
To halt worker some event must be triggered there. Pressing a button 
won't help as UI belongs to the main thread. Trying to open any file 
triggers event at worker side and it halts. By the way that's a problem 
as well for the IDE integration: to set breakpoint it needs to suspend 
VM which is not possible if no events are fired. I'm not sure you can do 
anything with it at fdb side. But I think you can fix fdb so that it 
doesn't set breakpoint in the file where it was not asked to.
The best would be to check all workers suspended at the moment and set 
breakpoints for each of them that contains this file.
If none found then the same message as for unresolved breakpoint is 
probably ok.

>
> Any thoughts ?
>
> Frédéric THOMAS
>
> ------------------------------------------------------------------------
> Date: Tue, 29 Apr 2014 19:48:39 +0400
> From: alexander.doroshko@jetbrains.com
> To: webdoublefx@hotmail.com
> Subject: Re: [FDB] Integration
>
> All bugs are there unfortunately.
> Note that you do not need to download anything else except 
> moreworkers.zip and do not need to setup the project in the IDE. Zip 
> already contains compiled MP3Worker.swf that you start after typing 
> 'run' in fdb console.
>
> Here's the listing showing both bugs (see comments). Hint: to have 
> user readable text instead of placeholders like !workerChanged! you 
> need to copy flex/tools/debugger/cli/fdb_*.properties files from 
> fdb.jar from the AIR SDK into your fdb.jar.
>
> Apache fdb (Flash Player Debugger) [build 20140426]
> Copyright 2014 The Apache Software Foundation.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> (fdb) c
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> 175?169 bytes after decompression
> !linePrefixWhenWorkerCreated! 1
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> !workerChanged! 1
>
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) info workers
> !mainThread! 0 - !workerRunning!
> *!inWorker! {worker=1} - !workerSuspended! !workerSelected!  // worker 
> 1 is active*
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 
> 493?264 bytes after decompression
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) worker 0
> *!workerChanged! !mainThread!  // fdb says that active worker is now 
> mainThread*
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) info workers
> !mainThread! 0 - !workerRunning!
> *!inWorker! {worker=1} - !workerSuspended! !workerSelected!**// but in 
> fact worker 1 remains active
> *Set additional breakpoints as desired, and then type 'continue'.
> (fdb) c
> halt
> Do you want to attempt to halt execution? (y or n) y
> Attempting to halt.
> To help out, try nudging the Player (e.g. press a button)
> Execution halted at 0x00009aeb (39659)
> (fdb) worker 0
> !workerChanged! !mainThread!
> (fdb) halt
> Attempting to suspend Player execution...
> Player stopped
> (fdb) info workers
> !mainThread! 0 - !workerSuspended! !workerSelected!
> !inWorker! {worker=1} - !workerSuspended!
> (fdb) show files
> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (!mainThread!)
> 2 /Users/leebrimelow/Documents/Adobe Flash Builder 
> 4.6/MP3Worker/src/Workers.as, Workers.as (!mainThread!)
> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 
> 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (!inWorker! {worker=1})
> 2 
> /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, 
> ShineMP3Encoder.as (!inWorker! {worker=1})
> *(fdb) break BackWorker.as:26  // **there's no **BackWorker.as**file 
> for active worker (which is mainThread)
> Breakpoint 1: file MP3Worker.as, line 26  // fdb sets the breakpoint 
> for a different file instead. I think because it also has id=1*
> (fdb)
>
> On 29.04.2014 19:21, Frédéric THOMAS wrote:
>
>     Hi Alexander,
>
>     Attached here the fdb.jar, as you can see in the first message of
>     the thread, the output is not the same than the AIR fdb version,
>     also, keep in mind that on each instance of each worker you need
>     to set back the BP, watches and displays (once the worker is loaded).
>
>     At the moment, I didn't take all the worker code from the
>     donation, the code used to evaluate expressions is still the same
>     than before, so, I'm not 100% sure my code works perfectly but
>     didn't find any bugs yet, the reason I did that is because the new
>     implementation is based on the Falcon AST tree and the build
>     script we have at the moment doesn't link it, I will work on this
>     script soon in order to be able to compile FDB with the new code
>     that evaluate the expressions.
>
>     Please keep me in touch with your experiments as I'm very
>     interested and don't hesitate to raise bugs.
>
>     Thanks,
>     Frédéric THOMAS
>
>



Re: [FDB] Integration

Posted by Alex Harui <ah...@adobe.com>.
IMO, unless the discussion is going to cover proprietary aspects of
IntelliJ, it might be more like the "Apache Way" to share the code in a
git branch and continue to discuss on the list.

On 4/29/14 8:03 AM, "Alexander Doroshko"
<al...@jetbrains.com> wrote:

>Yes, I'd gladly try it. We can switch to personal emails in order not to
>spam the list.
>
>On 29.04.2014 18:34, Frédéric THOMAS wrote:
>> Hi Alexander,
>>
>> I downloaded the files you indicated me + some missing files (UI,
>>ShineMP3, metallica.wav), created an IntelliJ project, build and run
>>successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my
>>version of FDB and was unable to reproduce both of the issues, it worked
>>as expected, so, that's a good news.
>>
>> Also, not on this test app but on another one [1], I've been able to
>>set a BP on the worker using IntelliJ once the worker has been loaded
>>but the variables was not readable and futur stops to the BP didn't
>>work, IJ shows up the SystemManager class instead.
>>
>> If you are interested to test my version, just tell me and I will send
>>it to you.
>>
>> Unfortunately, I haven't been able to work on it yesterday but will
>>continue tonight.
>>
>> Frédéric THOMAS
>>
>> [1] https://github.com/doublefx/downloadFileWorker
>>
>>
>>> Date: Tue, 29 Apr 2014 15:25:23 +0400
>>> From: alexander.doroshko@jetbrains.com
>>> To: dev@flex.apache.org
>>> Subject: Re: [FDB] Integration
>>>
>>> Hi Frédéric,
>>> that's great that you are ready to put the effort into fdb with workers
>>> support!
>>>
>>> I have to say that IntelliJ IDEA still doesn't support debugging apps
>>> with workers. I spent some time on it but faced some bugs in fdb that
>>> were not that easy to workaround. That's not an excuse for me and I
>>>hope
>>> to finally support workers debug in the next version. Luckily fdb is
>>>not
>>> a black box for me any more.
>>>
>>> Below are some of the bugs that I faced. I played with this project:
>>> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains
>>> already compiled MP3Worker.swf which is the main app.
>>>
>>> 1. When the worker is loaded it is impossible to switch to main thread
>>> using 'worker 0' command. Fdb says that active worker has changed but
>>> asking 'info workers' again says that actually it hasn't. See listing
>>>[1].
>>>
>>> 2. More important bug for the IDE integration is inability to set
>>> breakpoint without knowing file id. Files that belong to different
>>> workers may have the same id. When I ask to set a breakpoint in a file
>>> with given name but current active worker doesn't have file with this
>>> name then fdb sets the breakpoint inside completely different file that
>>> does belong to the current worker and has the same id as the file where
>>> I asked to set breakpoint. See listing [2].
>>>
>>> Alexander
>>>
>>> [1]
>>>
>>> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
>>> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false
>>>-Xms32m -Xmx512m
>>>-Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar
>>>"C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
>>> Adobe fdb (Flash Player Debugger) [build development]
>>> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
>>> (fdb) run
>>> Waiting for Player to connect
>>> Player connected; session starting.
>>> Set breakpoints and then type 'continue' to resume the session.
>>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
>>>175?169 bytes after decompression
>>> (fdb) c
>>> [WorkerCreate] 1
>>> Additional ActionScript code has been loaded from a SWF or a frame.
>>> To see all currently loaded files, type 'info files'.
>>> Active worker has changed to worker 1
>>> Set additional breakpoints as desired, and then type 'continue'.
>>> (fdb) info workers
>>> Main Thread 0 - Running
>>> Worker 1 - Suspended (Active)
>>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf -
>>>493?264 bytes after decompression
>>> Set additional breakpoints as desired, and then type 'continue'.
>>> (fdb) worker 0
>>> *Active worker has changed to worker Main Thread*
>>> Set additional breakpoints as desired, and then type 'continue'.
>>> (fdb) info workers
>>> *Main Thread 0 - Running*
>>> *Worker 1 - Suspended (Active)**
>>> *Set additional breakpoints as desired, and then type 'continue'.
>>> (fdb)
>>>
>>> [2]
>>>
>>> ...
>>> (fdb) info workers
>>> Main Thread 0 - Suspended (Active)
>>> Worker 1 - Suspended
>>> (fdb) show files
>>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
>>>4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
>>> 2 /Users/leebrimelow/Documents/Adobe Flash Builder
>>>4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
>>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder
>>>4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
>>> 2 
>>>/Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encode
>>>r.as, ShineMP3Encoder.as (Worker 1)
>>> *(fdb) break BackWorker.as:26**
>>> **Breakpoint 2: file MP3Worker.as, line 26**
>>> *(fdb)
>>>
>>>
>>> On 27.04.2014 4:01, Frédéric THOMAS wrote:
>>>> Hi,
>>>>
>>>> To resume a bit what I did and discover today:
>>>>
>>>> 1- I merged the donated code to the the current FDB, keeping the
>>>>existing fixes and the current ExpressionEvaluator (I guess It is
>>>>possible to use the new Falcon based implementation modifying the ANT
>>>>script which builds it, in order to link the Falcon sources).
>>>>
>>>> 2- The new commands are "worker <workerID>" used to select a
>>>>parlicular worker by its ID and "info workers", this is an example of
>>>>what gives a break inside a worker and what displays the 2 commands :
>>>>
>>>> (fdb) info workers
>>>> !mainThread! 0 - !workerRunning!
>>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>>>>
>>>> (fdb) worker 0
>>>> !workerChanged! !mainThread!
>>>>
>>>> (fdb) info workers
>>>> !mainThread! 0 - !workerRunning! !workerSelected!
>>>> !inWorker! {worker=1} - !workerSuspended!
>>>>
>>>> (fdb) worker 1
>>>> !workerChanged! 1
>>>>
>>>> (fdb) info workers
>>>> !mainThread! 0 - !workerRunning!
>>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>>>>
>>>> Note for IDE integration:
>>>>
>>>> 1- At the moment, watch, displays and breakpoints are set for 1
>>>>particular worker, it means, they need to be defined again when a
>>>>worker starts.
>>>> 2- "info breakpoints" does well display the breakpoints for the same
>>>>line and on different worker of the same class but without the
>>>>relative worker ID (I guess it could be easily fixed)
>>>>
>>>> I'll be back on it on Monday.
>>>>
>>>> Frédéric THOMAS 		 	   		
>>   		 	   		
>


Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Yes, I'd gladly try it. We can switch to personal emails in order not to 
spam the list.

On 29.04.2014 18:34, Frédéric THOMAS wrote:
> Hi Alexander,
>
> I downloaded the files you indicated me + some missing files (UI, ShineMP3, metallica.wav), created an IntelliJ project, build and run successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my version of FDB and was unable to reproduce both of the issues, it worked as expected, so, that's a good news.
>
> Also, not on this test app but on another one [1], I've been able to set a BP on the worker using IntelliJ once the worker has been loaded but the variables was not readable and futur stops to the BP didn't work, IJ shows up the SystemManager class instead.
>
> If you are interested to test my version, just tell me and I will send it to you.
>
> Unfortunately, I haven't been able to work on it yesterday but will continue tonight.
>
> Frédéric THOMAS
>
> [1] https://github.com/doublefx/downloadFileWorker
>
>
>> Date: Tue, 29 Apr 2014 15:25:23 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: [FDB] Integration
>>
>> Hi Frédéric,
>> that's great that you are ready to put the effort into fdb with workers
>> support!
>>
>> I have to say that IntelliJ IDEA still doesn't support debugging apps
>> with workers. I spent some time on it but faced some bugs in fdb that
>> were not that easy to workaround. That's not an excuse for me and I hope
>> to finally support workers debug in the next version. Luckily fdb is not
>> a black box for me any more.
>>
>> Below are some of the bugs that I faced. I played with this project:
>> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains
>> already compiled MP3Worker.swf which is the main app.
>>
>> 1. When the worker is loaded it is impossible to switch to main thread
>> using 'worker 0' command. Fdb says that active worker has changed but
>> asking 'info workers' again says that actually it hasn't. See listing [1].
>>
>> 2. More important bug for the IDE integration is inability to set
>> breakpoint without knowing file id. Files that belong to different
>> workers may have the same id. When I ask to set a breakpoint in a file
>> with given name but current active worker doesn't have file with this
>> name then fdb sets the breakpoint inside completely different file that
>> does belong to the current worker and has the same id as the file where
>> I asked to set breakpoint. See listing [2].
>>
>> Alexander
>>
>> [1]
>>
>> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
>> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar "C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
>> Adobe fdb (Flash Player Debugger) [build development]
>> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
>> (fdb) run
>> Waiting for Player to connect
>> Player connected; session starting.
>> Set breakpoints and then type 'continue' to resume the session.
>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 bytes after decompression
>> (fdb) c
>> [WorkerCreate] 1
>> Additional ActionScript code has been loaded from a SWF or a frame.
>> To see all currently loaded files, type 'info files'.
>> Active worker has changed to worker 1
>> Set additional breakpoints as desired, and then type 'continue'.
>> (fdb) info workers
>> Main Thread 0 - Running
>> Worker 1 - Suspended (Active)
>> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 bytes after decompression
>> Set additional breakpoints as desired, and then type 'continue'.
>> (fdb) worker 0
>> *Active worker has changed to worker Main Thread*
>> Set additional breakpoints as desired, and then type 'continue'.
>> (fdb) info workers
>> *Main Thread 0 - Running*
>> *Worker 1 - Suspended (Active)**
>> *Set additional breakpoints as desired, and then type 'continue'.
>> (fdb)
>>
>> [2]
>>
>> ...
>> (fdb) info workers
>> Main Thread 0 - Suspended (Active)
>> Worker 1 - Suspended
>> (fdb) show files
>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
>> 2 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
>> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
>> 2 /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, ShineMP3Encoder.as (Worker 1)
>> *(fdb) break BackWorker.as:26**
>> **Breakpoint 2: file MP3Worker.as, line 26**
>> *(fdb)
>>
>>
>> On 27.04.2014 4:01, Frédéric THOMAS wrote:
>>> Hi,
>>>
>>> To resume a bit what I did and discover today:
>>>
>>> 1- I merged the donated code to the the current FDB, keeping the existing fixes and the current ExpressionEvaluator (I guess It is possible to use the new Falcon based implementation modifying the ANT script which builds it, in order to link the Falcon sources).
>>>
>>> 2- The new commands are "worker <workerID>" used to select a parlicular worker by its ID and "info workers", this is an example of what gives a break inside a worker and what displays the 2 commands :
>>>
>>> (fdb) info workers
>>> !mainThread! 0 - !workerRunning!
>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>>>
>>> (fdb) worker 0
>>> !workerChanged! !mainThread!
>>>
>>> (fdb) info workers
>>> !mainThread! 0 - !workerRunning! !workerSelected!
>>> !inWorker! {worker=1} - !workerSuspended!
>>>
>>> (fdb) worker 1
>>> !workerChanged! 1
>>>
>>> (fdb) info workers
>>> !mainThread! 0 - !workerRunning!
>>> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>>>
>>> Note for IDE integration:
>>>
>>> 1- At the moment, watch, displays and breakpoints are set for 1 particular worker, it means, they need to be defined again when a worker starts.
>>> 2- "info breakpoints" does well display the breakpoints for the same line and on different worker of the same class but without the relative worker ID (I guess it could be easily fixed)
>>>
>>> I'll be back on it on Monday.
>>>
>>> Frédéric THOMAS 		 	   		
>   		 	   		


RE: [FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi Alexander,

I downloaded the files you indicated me + some missing files (UI, ShineMP3, metallica.wav), created an IntelliJ project, build and run successfully the application with Apache Flex SDK 4.12 / AIR 4.0 + my version of FDB and was unable to reproduce both of the issues, it worked as expected, so, that's a good news.

Also, not on this test app but on another one [1], I've been able to set a BP on the worker using IntelliJ once the worker has been loaded but the variables was not readable and futur stops to the BP didn't work, IJ shows up the SystemManager class instead.

If you are interested to test my version, just tell me and I will send it to you.

Unfortunately, I haven't been able to work on it yesterday but will continue tonight.

Frédéric THOMAS

[1] https://github.com/doublefx/downloadFileWorker


> Date: Tue, 29 Apr 2014 15:25:23 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: [FDB] Integration
> 
> Hi Frédéric,
> that's great that you are ready to put the effort into fdb with workers 
> support!
> 
> I have to say that IntelliJ IDEA still doesn't support debugging apps 
> with workers. I spent some time on it but faced some bugs in fdb that 
> were not that easy to workaround. That's not an excuse for me and I hope 
> to finally support workers debug in the next version. Luckily fdb is not 
> a black box for me any more.
> 
> Below are some of the bugs that I faced. I played with this project: 
> http://gotoandlearn.com/play.php?id=169. 'Download files' link contains 
> already compiled MP3Worker.swf which is the main app.
> 
> 1. When the worker is loaded it is impossible to switch to main thread 
> using 'worker 0' command. Fdb says that active worker has changed but 
> asking 'info workers' again says that actually it hasn't. See listing [1].
> 
> 2. More important bug for the IDE integration is inability to set 
> breakpoint without knowing file id. Files that belong to different 
> workers may have the same id. When I ask to set a breakpoint in a file 
> with given name but current active worker doesn't have file with this 
> name then fdb sets the breakpoint inside completely different file that 
> does belong to the current worker and has the same id as the file where 
> I asked to set breakpoint. See listing [2].
> 
> Alexander
> 
> [1]
> 
> C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
> C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar "C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
> Adobe fdb (Flash Player Debugger) [build development]
> Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
> (fdb) run
> Waiting for Player to connect
> Player connected; session starting.
> Set breakpoints and then type 'continue' to resume the session.
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 bytes after decompression
> (fdb) c
> [WorkerCreate] 1
> Additional ActionScript code has been loaded from a SWF or a frame.
> To see all currently loaded files, type 'info files'.
> Active worker has changed to worker 1
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) info workers
> Main Thread 0 - Running
> Worker 1 - Suspended (Active)
> [SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 bytes after decompression
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) worker 0
> *Active worker has changed to worker Main Thread*
> Set additional breakpoints as desired, and then type 'continue'.
> (fdb) info workers
> *Main Thread 0 - Running*
> *Worker 1 - Suspended (Active)**
> *Set additional breakpoints as desired, and then type 'continue'.
> (fdb)
> 
> [2]
> 
> ...
> (fdb) info workers
> Main Thread 0 - Suspended (Active)
> Worker 1 - Suspended
> (fdb) show files
> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
> 2 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
> 1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
> 2 /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, ShineMP3Encoder.as (Worker 1)
> *(fdb) break BackWorker.as:26**
> **Breakpoint 2: file MP3Worker.as, line 26**
> *(fdb)
> 
> 
> On 27.04.2014 4:01, Frédéric THOMAS wrote:
> > Hi,
> >
> > To resume a bit what I did and discover today:
> >
> > 1- I merged the donated code to the the current FDB, keeping the existing fixes and the current ExpressionEvaluator (I guess It is possible to use the new Falcon based implementation modifying the ANT script which builds it, in order to link the Falcon sources).
> >
> > 2- The new commands are "worker <workerID>" used to select a parlicular worker by its ID and "info workers", this is an example of what gives a break inside a worker and what displays the 2 commands :
> >
> > (fdb) info workers
> > !mainThread! 0 - !workerRunning!
> > !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >
> > (fdb) worker 0
> > !workerChanged! !mainThread!
> >
> > (fdb) info workers
> > !mainThread! 0 - !workerRunning! !workerSelected!
> > !inWorker! {worker=1} - !workerSuspended!
> >
> > (fdb) worker 1
> > !workerChanged! 1
> >
> > (fdb) info workers
> > !mainThread! 0 - !workerRunning!
> > !inWorker! {worker=1} - !workerSuspended! !workerSelected!
> >
> > Note for IDE integration:
> >
> > 1- At the moment, watch, displays and breakpoints are set for 1 particular worker, it means, they need to be defined again when a worker starts.
> > 2- "info breakpoints" does well display the breakpoints for the same line and on different worker of the same class but without the relative worker ID (I guess it could be easily fixed)
> >
> > I'll be back on it on Monday.
> >
> > Frédéric THOMAS 		 	   		
> 
 		 	   		  

Re: [FDB] Integration

Posted by Alexander Doroshko <al...@jetbrains.com>.
Hi Frédéric,
that's great that you are ready to put the effort into fdb with workers 
support!

I have to say that IntelliJ IDEA still doesn't support debugging apps 
with workers. I spent some time on it but faced some bugs in fdb that 
were not that easy to workaround. That's not an excuse for me and I hope 
to finally support workers debug in the next version. Luckily fdb is not 
a black box for me any more.

Below are some of the bugs that I faced. I played with this project: 
http://gotoandlearn.com/play.php?id=169. 'Download files' link contains 
already compiled MP3Worker.swf which is the main app.

1. When the worker is loaded it is impossible to switch to main thread 
using 'worker 0' command. Fdb says that active worker has changed but 
asking 'info workers' again says that actually it hasn't. See listing [1].

2. More important bug for the IDE integration is inability to set 
breakpoint without knowing file id. Files that belong to different 
workers may have the same id. When I ask to set a breakpoint in a file 
with given name but current active worker doesn't have file with this 
name then fdb sets the breakpoint inside completely different file that 
does belong to the current worker and has the same id as the file where 
I asked to set breakpoint. See listing [2].

Alexander

[1]

C:\flex\air_sdk_13.0_asc_2.0\bin>fdb
C:\flex\air_sdk_13.0_asc_2.0\bin>java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dapplication.home="C:\flex\air_sdk_13.0_asc_2.0\bin\.." -jar "C:\flex\air_sdk_13.0_asc_2.0\bin\../lib/legacy/fdb.jar"
Adobe fdb (Flash Player Debugger) [build development]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 175?169 bytes after decompression
(fdb) c
[WorkerCreate] 1
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Active worker has changed to worker 1
Set additional breakpoints as desired, and then type 'continue'.
(fdb) info workers
Main Thread 0 - Running
Worker 1 - Suspended (Active)
[SWF] C:\work\flex_projects\MP3Worker\bin-debug\MP3Worker.swf - 493?264 bytes after decompression
Set additional breakpoints as desired, and then type 'continue'.
(fdb) worker 0
*Active worker has changed to worker Main Thread*
Set additional breakpoints as desired, and then type 'continue'.
(fdb) info workers
*Main Thread 0 - Running*
*Worker 1 - Suspended (Active)**
*Set additional breakpoints as desired, and then type 'continue'.
(fdb)

[2]

...
(fdb) info workers
Main Thread 0 - Suspended (Active)
Worker 1 - Suspended
(fdb) show files
1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/MP3Worker.as, MP3Worker.as (Main Thread)
2 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/Workers.as, Workers.as (Main Thread)
1 /Users/leebrimelow/Documents/Adobe Flash Builder 4.6/MP3Worker/src/BackWorker.as, BackWorker.as (Worker 1)
2 /Users/kikko/work/tests/shineMP3_alchemy/src/fr/kikko/lab/ShineMP3Encoder.as, ShineMP3Encoder.as (Worker 1)
*(fdb) break BackWorker.as:26**
**Breakpoint 2: file MP3Worker.as, line 26**
*(fdb)


On 27.04.2014 4:01, Frédéric THOMAS wrote:
> Hi,
>
> To resume a bit what I did and discover today:
>
> 1- I merged the donated code to the the current FDB, keeping the existing fixes and the current ExpressionEvaluator (I guess It is possible to use the new Falcon based implementation modifying the ANT script which builds it, in order to link the Falcon sources).
>
> 2- The new commands are "worker <workerID>" used to select a parlicular worker by its ID and "info workers", this is an example of what gives a break inside a worker and what displays the 2 commands :
>
> (fdb) info workers
> !mainThread! 0 - !workerRunning!
> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>
> (fdb) worker 0
> !workerChanged! !mainThread!
>
> (fdb) info workers
> !mainThread! 0 - !workerRunning! !workerSelected!
> !inWorker! {worker=1} - !workerSuspended!
>
> (fdb) worker 1
> !workerChanged! 1
>
> (fdb) info workers
> !mainThread! 0 - !workerRunning!
> !inWorker! {worker=1} - !workerSuspended! !workerSelected!
>
> Note for IDE integration:
>
> 1- At the moment, watch, displays and breakpoints are set for 1 particular worker, it means, they need to be defined again when a worker starts.
> 2- "info breakpoints" does well display the breakpoints for the same line and on different worker of the same class but without the relative worker ID (I guess it could be easily fixed)
>
> I'll be back on it on Monday.
>
> Frédéric THOMAS 		 	   		


[FDB] Integration

Posted by Frédéric THOMAS <we...@hotmail.com>.
Hi,

To resume a bit what I did and discover today:

1- I merged the donated code to the the current FDB, keeping the existing fixes and the current ExpressionEvaluator (I guess It is possible to use the new Falcon based implementation modifying the ANT script which builds it, in order to link the Falcon sources).

2- The new commands are "worker <workerID>" used to select a parlicular worker by its ID and "info workers", this is an example of what gives a break inside a worker and what displays the 2 commands :

(fdb) info workers
!mainThread! 0 - !workerRunning!
!inWorker! {worker=1} - !workerSuspended! !workerSelected!

(fdb) worker 0
!workerChanged! !mainThread!

(fdb) info workers
!mainThread! 0 - !workerRunning! !workerSelected!
!inWorker! {worker=1} - !workerSuspended!

(fdb) worker 1
!workerChanged! 1

(fdb) info workers
!mainThread! 0 - !workerRunning!
!inWorker! {worker=1} - !workerSuspended! !workerSelected!

Note for IDE integration: 

1- At the moment, watch, displays and breakpoints are set for 1 particular worker, it means, they need to be defined again when a worker starts.
2- "info breakpoints" does well display the breakpoints for the same line and on different worker of the same class but without the relative worker ID (I guess it could be easily fixed)

I'll be back on it on Monday.

Frédéric THOMAS 		 	   		  

Re: [FlexJS] adt.jar not found on FlexJS SDK

Posted by "paulo.campos1" <pa...@pictengine.com>.
Hi Alex.
Thanks for the reply.

No. there isn´t any adt.jar on my instalation. Should i try to re install?


2014-04-26 16:15 GMT+01:00 Alex Harui [via Apache Flex Development] <
ml-node+s2333347n37268h7@n4.nabble.com>:

>
>
> On 4/26/14 7:26 AM, "paulo.campos1" <[hidden email]<http://user/SendEmail.jtp?type=node&node=37268&i=0>>
> wrote:
>
> >Hi. After installation of FlexJs through the new 3.0 intaller, i am
> >following
> >this
> >"
> https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
> >Flash+Builder"
> >post to try this new  baby. When i try to add flexJS SDK in Flash Builder
> >4.7, i get the following error.
> >"adt.jar not found in classpath of .... " I am on win7 machine. Am i
> doing
> >something wrong?
> >
> Hmm.  Is there an adt.jar in the lib folder of your FlexJS SDK?  Sometimes
> there can be a problem with the AIR SDK download.
>
> Thanks,
> -Alex
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-found-on-FlexJS-SDK-tp37266p37268.html
>  To start a new topic under Apache Flex Development, email
> ml-node+s2333347n1h30@n4.nabble.com
> To unsubscribe from Apache Flex Development, click here<http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cGF1bG8uY2FtcG9zQHBpY3RlbmdpbmUuY29tfDF8LTQwNDQxODkwMw==>
> .
> NAML<http://apache-flex-development.2333347.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-adt-jar-not-found-on-FlexJS-SDK-tp37266p37271.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] adt.jar not found on FlexJS SDK

Posted by Alex Harui <ah...@adobe.com>.

On 4/26/14 7:26 AM, "paulo.campos1" <pa...@pictengine.com> wrote:

>Hi. After installation of FlexJs through the new 3.0 intaller, i am
>following
>this 
>"https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+
>Flash+Builder"
>post to try this new  baby. When i try to add flexJS SDK in Flash Builder
>4.7, i get the following error.
>"adt.jar not found in classpath of .... " I am on win7 machine. Am i doing
>something wrong?
>
Hmm.  Is there an adt.jar in the lib folder of your FlexJS SDK?  Sometimes
there can be a problem with the AIR SDK download.

Thanks,
-Alex