You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Frédéric THOMAS <we...@hotmail.com> on 2014/01/14 19:18:48 UTC

FDB vs FB debugging ?

Hi,

I'm facing an issue using IntelliJ or FDB directly to debug multi-module projects then tried with FB and had no problems, maybe someone can enlighten me regarding the differences, basically, the issue is that I can't set a breakpoint in a module, these are the returned messages "Breakpoint not set; no executable code at line" or "There is no executable code on the specified line" :


In FDB:

[SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/2 - 3á918 bytes after decompression
[SWF] //Memotech60PT/UI/modules/Authentication/AuthenticationModule-en_US.swf - 341á370 bytes after decompression
[SWF] //Memotech60PT/UI/modules/Authentication/AuthenticationModule.swf - 6á135á818 bytes after decompression
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'.

(fdb) info files Aut*
AuthenticateUserCommand.as#2400
AuthenticateUserEvent.as#1043
AuthenticationTicket.as#596
AuthorizationControl.as#971
AuthorizationEvent.as#1670
AuthorizationManger.as#927
AuthorizationServiceDelegate.as#2682
AutoComplete.mxml#1632
AutoCompleteItemRemoveEvent.as#947
AutoSizeTree.as#3133

(fdb) continue
Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'.

(fdb) info files Aut*
AuthenticateUserCommand.as#2400
AuthenticateUserEvent.as#1043
AuthenticationModule.mxml#4949
AuthenticationTicket.as#596
AuthorizationControl.as#971
AuthorizationEvent.as#1670
AuthorizationManger.as#927
AuthorizationServiceDelegate.as#2682
AutoComplete.mxml#1632
AutoCompleteItemRemoveEvent.as#947
AutoSizeTree.as#3133

(fdb) list AuthenticationModule.mxml:37
 32
 33          [Bindable]
 34          public var _accCtrlModel : AccessControlServiceModelLocator = AccessControlServiceModelLocator.getInstance();
 35
 36          override protected function initHandler() : void {
 37            resetLocalization();
 38          }
 39
 40          private function displayChangePwdForm( event : Event ) : void {
 41            this.currentState = "PasswordChange";
 
(fdb) file AuthenticationModule.mxml
(fdb) break 37
Breakpoint not set; no executable code at line 37 of AuthenticationModule.mxml#4949
(fdb)

-----------------------------------------------
In IntelliJ after having configured the logs correctly:

2014-01-14 16:20:54,227 [ 120523]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454227 Apache fdb (Flash Player Debugger) [build 0] 
2014-01-14 16:20:54,227 [ 120523]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454227 Processed by com.intellij.lang.javascript.flex.debug.FlexDebugProcess$ReadGreetingCommand 
2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454230 Sent:run 
2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454230 Copyright 2013 The Apache Software Foundation. 
2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454230 Processed by com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserCommand 
2014-01-14 16:20:54,326 [ 120622]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454326 Waiting for Player to connect 
2014-01-14 16:20:54,326 [ 120622]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716454326 Processed by com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserCommand 
2014-01-14 16:20:54,441 [ 120737]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/consoleFolding.xml file is null 
2014-01-14 16:20:55,245 [ 121541]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@169bf512; elapsed time was 75ms 
2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461021 Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] //Memotech60PT/UI/shell.swf - 14,919,314 bytes after decompression 
2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461021 Processed by com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserCommand 
2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461021 Sent:break Authentication.AuthenticationModule.mxml:37 
2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461045 Breakpoint 1 created, but not yet resolved.
The breakpoint will be resolved when the corresponding file or function is loaded. 
2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461045 Processed by com.intellij.lang.javascript.flex.debug.FlexBreakpointsHandler$InsertBreakpointCommand 
2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716461045 Sent:continue 
2014-01-14 16:21:03,520 [ 129816]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716463520 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'. 
2014-01-14 16:21:03,520 [ 129816]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716463520 Sent:continue 
2014-01-14 16:21:04,834 [ 131130]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716464834 [SWF] //Memotech60PT/UI/ApplicationResources-en_US.swf - 436,155 bytes after decompression 
2014-01-14 16:21:04,935 [ 131231]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716464935 [SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/1 - 3,918 bytes after decompression 
2014-01-14 16:21:05,646 [ 131942]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716465646 [SWF] //Memotech60PT/UI/modules/UserReports/UserReportsModule-en_US.swf - 341,044 bytes after decompression 
2014-01-14 16:21:05,747 [ 132043]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716465747 [SWF] //Memotech60PT/UI/modules/UserReports/UserReportsModule.swf - 9,757,814 bytes after decompression 
2014-01-14 16:21:25,914 [ 152210]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716485914 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'. 
2014-01-14 16:21:25,914 [ 152210]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716485914 Sent:continue 
2014-01-14 16:21:47,948 [ 174244]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716507948 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'. 
2014-01-14 16:21:47,949 [ 174245]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716507949 Sent:continue 
2014-01-14 16:21:48,642 [ 174938]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716508642 [trace] warning: The class Memotech.PatentComponent.Services.vo.DocketingWorkbench has been used in a call to net.registerClassAlias() in _UserReportsModule_FlexInit. This will cause UserReports:UserReportsModule to be leaked. To resolve the leak, define Memotech.PatentComponent.Services.vo.DocketingWorkbench in the top-level application.   
[trace] warning: The class Memotech.TrademarkComponent.Services.vo.DocketingWorkbench has been used in a call to net.registerClassAlias() in _UserReportsModule_FlexInit. This will cause UserReports:UserReportsModule to be leaked. To resolve the leak, define Memotech.TrademarkComponent.Services.vo.DocketingWorkbench in the top-level application. 
2014-01-14 16:21:48,747 [ 175043]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716508747 [SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/2 - 3,918 bytes after decompression 
2014-01-14 16:21:48,860 [ 175156]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716508860 [SWF] //Memotech60PT/UI/modules/Authentication/AuthenticationModule-en_US.swf - 341,370 bytes after decompression 
2014-01-14 16:21:48,961 [ 175257]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716508961 [SWF] //Memotech60PT/UI/modules/Authentication/AuthenticationModule.swf - 6,135,818 bytes after decompression 
2014-01-14 16:22:08,972 [ 195268]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716528972 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'. 
2014-01-14 16:22:08,972 [ 195268]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716528972 Sent:continue 
2014-01-14 16:22:30,006 [ 216302]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716550006 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Attempting to resolve breakpoint 1, expression "Authentication.AuthenticationModule.mxml:37":
There is no executable code on the specified line.
Fix or remove bad breakpoints, then type 'continue'. 
2014-01-14 16:22:30,012 [ 216308]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716550012 Sent:continue 
2014-01-14 16:22:33,665 [ 219961]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716553665 [UnloadSWF] //Memotech60PT/UI/shell.swf 
2014-01-14 16:22:33,768 [ 220064]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716553768 Player session terminated
 
2014-01-14 16:22:33,773 [ 220069]  DEBUG - pt.flex.debug.FlexDebugProcess - 1389716553773 Sent:quit

Thanks,
Frédéric THOMAS 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
I have a case (without AS workers) where FDB from Apache Flex SDK 
doesn't work, but form Adobe AIR SDK works: 
http://youtrack.jetbrains.com/issue/IDEA-116629

On 15.01.2014 16:58, Frédéric THOMAS wrote:
> The need is only about the ability to debug Workers IMO which is still a important requested feature but let's see.
>
> Frédéric THOMAS
>
>> Date: Wed, 15 Jan 2014 16:25:53 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>>
>> That would be cool! FB doesn't use DebugCLI class (it is pure
>> command-line specific high level wrapper), so it is safe.
>>
>> By the way Alex said that updated FDB from Adobe AIR SDK will be finally
>> donated soon and will be incorporated into Apache repo. We'll need to
>> check the need and applicability of these fixes then.


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
The need is only about the ability to debug Workers IMO which is still a important requested feature but let's see.

Frédéric THOMAS

> Date: Wed, 15 Jan 2014 16:25:53 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> That would be cool! FB doesn't use DebugCLI class (it is pure 
> command-line specific high level wrapper), so it is safe.
> 
> By the way Alex said that updated FDB from Adobe AIR SDK will be finally 
> donated soon and will be incorporated into Apache repo. We'll need to 
> check the need and applicability of these fixes then.
> 
> On 15.01.2014 16:04, Frédéric THOMAS wrote:
> > Will try to merge and check that doesn't  break anything in FB too.
> >
> > Thanks,
> > Frédéric THOMAS
> >
> >> Date: Wed, 15 Jan 2014 15:53:58 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: FDB vs FB debugging ?
> >>
> >>> Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
> >> Source code for my patch can be found in [IntelliJ IDEA
> >> Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
> >> It solves some issues:
> >>
> >> 1. escapes CRLF and some other special chars in fdb output that makes it
> >> easier to work with it at IDE side
> >>
> >> 2. adds file id to the stack info printed by fdb (line 1182 in original
> >> file == line 1178 in my patch)
> >>
> >> boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);
> >>
> >> 3. prints full stack if Flash Player detects not handled exception
> >> (original fdb prints only error message).
> >>
> >> See void dumpFaultLine(FaultEvent e){...}
> >>
> >> 4. The most important fix is inside findAndEnableBreak(...) method
> >> implementation and it solves the following issues:
> >>
> >> Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)
> >>
> >> Breakpoints in ActionScript files do not work when debugging app using ANE
> >> (http://youtrack.jetbrains.com/issue/IDEA-94128)
> >>
> >>
> >> I think all fixes except the first one can be added to Apache repo. All
> >> of them are in a DebugCLI.java file. The most important is the 4th case
> >> with breakpoints not working without a fix.
> >>
> >> Alexander
> >   		 	   		
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
That would be cool! FB doesn't use DebugCLI class (it is pure 
command-line specific high level wrapper), so it is safe.

By the way Alex said that updated FDB from Adobe AIR SDK will be finally 
donated soon and will be incorporated into Apache repo. We'll need to 
check the need and applicability of these fixes then.

On 15.01.2014 16:04, Frédéric THOMAS wrote:
> Will try to merge and check that doesn't  break anything in FB too.
>
> Thanks,
> Frédéric THOMAS
>
>> Date: Wed, 15 Jan 2014 15:53:58 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>>
>>> Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
>> Source code for my patch can be found in [IntelliJ IDEA
>> Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
>> It solves some issues:
>>
>> 1. escapes CRLF and some other special chars in fdb output that makes it
>> easier to work with it at IDE side
>>
>> 2. adds file id to the stack info printed by fdb (line 1182 in original
>> file == line 1178 in my patch)
>>
>> boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);
>>
>> 3. prints full stack if Flash Player detects not handled exception
>> (original fdb prints only error message).
>>
>> See void dumpFaultLine(FaultEvent e){...}
>>
>> 4. The most important fix is inside findAndEnableBreak(...) method
>> implementation and it solves the following issues:
>>
>> Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)
>>
>> Breakpoints in ActionScript files do not work when debugging app using ANE
>> (http://youtrack.jetbrains.com/issue/IDEA-94128)
>>
>>
>> I think all fixes except the first one can be added to Apache repo. All
>> of them are in a DebugCLI.java file. The most important is the 4th case
>> with breakpoints not working without a fix.
>>
>> Alexander
>   		 	   		


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
Will try to merge and check that doesn't  break anything in FB too.

Thanks,
Frédéric THOMAS

> Date: Wed, 15 Jan 2014 15:53:58 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> > Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
> Source code for my patch can be found in [IntelliJ IDEA 
> Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
> It solves some issues:
> 
> 1. escapes CRLF and some other special chars in fdb output that makes it 
> easier to work with it at IDE side
> 
> 2. adds file id to the stack info printed by fdb (line 1182 in original 
> file == line 1178 in my patch)
> 
> boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);
> 
> 3. prints full stack if Flash Player detects not handled exception 
> (original fdb prints only error message).
> 
> See void dumpFaultLine(FaultEvent e){...}
> 
> 4. The most important fix is inside findAndEnableBreak(...) method 
> implementation and it solves the following issues:
> 
> Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)
> 
> Breakpoints in ActionScript files do not work when debugging app using ANE
> (http://youtrack.jetbrains.com/issue/IDEA-94128)
> 
> 
> I think all fixes except the first one can be added to Apache repo. All 
> of them are in a DebugCLI.java file. The most important is the 4th case 
> with breakpoints not working without a fix.
> 
> Alexander
 		 	   		  

RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
Oups, the file is here [1] in the subtask [2] 

Frédéric THOMAS

[1] https://issues.apache.org/jira/secure/attachment/12623373/fdb.jar
[2] https://issues.apache.org/jira/browse/FLEX-26768

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: FDB vs FB debugging ?
> Date: Thu, 16 Jan 2014 13:23:13 +0000
> 
> Hi Alexander,
> 
> Just attached the fixed fdb.jar for test in the JIRA parent [1] with all your changes except the 1st one + the current fixed issue, can you check it works with all the test cases you have.
> 
> Thanks,
> Frédéric THOMAS
> 
> [1] https://issues.apache.org/jira/browse/FLEX-34042
> 
> > Date: Wed, 15 Jan 2014 15:53:58 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: FDB vs FB debugging ?
> > 
> > > Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
> > Source code for my patch can be found in [IntelliJ IDEA 
> > Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
> > It solves some issues:
> > 
> > 1. escapes CRLF and some other special chars in fdb output that makes it 
> > easier to work with it at IDE side
> > 
> > 2. adds file id to the stack info printed by fdb (line 1182 in original 
> > file == line 1178 in my patch)
> > 
> > boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);
> > 
> > 3. prints full stack if Flash Player detects not handled exception 
> > (original fdb prints only error message).
> > 
> > See void dumpFaultLine(FaultEvent e){...}
> > 
> > 4. The most important fix is inside findAndEnableBreak(...) method 
> > implementation and it solves the following issues:
> > 
> > Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)
> > 
> > Breakpoints in ActionScript files do not work when debugging app using ANE
> > (http://youtrack.jetbrains.com/issue/IDEA-94128)
> > 
> > 
> > I think all fixes except the first one can be added to Apache repo. All 
> > of them are in a DebugCLI.java file. The most important is the 4th case 
> > with breakpoints not working without a fix.
> > 
> > Alexander
>  		 	   		  
 		 	   		  

RE: FDB vs FB debugging ?

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

Thanks,
Frédéric THOMAS

> Date: Thu, 16 Jan 2014 18:31:59 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> > Alexander, can you attach the FDB patches you gave to Fred to one of the
> > JIRA issues?  That way we can have a consistent way of tracking your
> > permission to use those patches.
> Sure, attached to https://issues.apache.org/jira/browse/FLEX-34042
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
> Alexander, can you attach the FDB patches you gave to Fred to one of the
> JIRA issues?  That way we can have a consistent way of tracking your
> permission to use those patches.
Sure, attached to https://issues.apache.org/jira/browse/FLEX-34042

RE: FDB vs FB debugging ?

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

Actually, I moved the fixed jar onto the parent jira [1], Alexander attached it his original code and that's the current state of the attached files, so, it should be all what we need.
(Sorry for the confusion because I did it in the same time but removed the extra file right after I've seen he did it.)

Thanks,
Frédéric THOMAS

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

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> Date: Thu, 16 Jan 2014 15:54:15 +0000
> 
> Well, we need Alexander to attach it so it records it as a donation from
> them.
> 
> It is optional whether to put your changes in the JIRA.  Folks might
> prefer the jar over having the sources, but up to you.
> 
> Thanks to both of you,
> -Alex
> 
> On 1/16/14 6:28 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >Hi Alex,
> >
> >Yeah, I'm happy too, to be able to set breakpoints in runtime loaded
> >modules now.
> >
> >I should have attached the idea fix sources, will do it right now and
> >move the fixed fdb.jar to the parent issue as it should, in case users
> >want to test / use it before the release.
> >
> >Thanks,
> >Frédéric THOMAS
> >
> >> From: aharui@adobe.com
> >> To: dev@flex.apache.org
> >> Subject: Re: FDB vs FB debugging ?
> >> Date: Thu, 16 Jan 2014 14:22:16 +0000
> >> 
> >> Yay Fred!  Great job!
> >> 
> >> Alexander, can you attach the FDB patches you gave to Fred to one of the
> >> JIRA issues?  That way we can have a consistent way of tracking your
> >> permission to use those patches.
> >> 
> >> Thanks,
> >> -Alex
> >> 
> >> On 1/16/14 6:11 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> >> 
> >> >No problemo, especially because most of those fixes came from you, so,
> >> >many thanks to you :-)
> >> >
> >> >Btw, does it means the idea-fdb-fix will contains only the StringUtil /
> >> >ExpressionCache fixes now ?
> >> >I didn't integrated this fix because you told me it is more an IDE
> >>thing
> >> >and I didn't look at it closely, what impact it would be to integrate
> >>it
> >> >and using FDB standalone ?
> >> >
> >> >Thanks,
> >> >Frédéric THOMAS
> >> >
> >> >> Date: Thu, 16 Jan 2014 18:00:05 +0400
> >> >> From: alexander.doroshko@jetbrains.com
> >> >> To: dev@flex.apache.org
> >> >> Subject: Re: FDB vs FB debugging ?
> >> >> 
> >> >> Checked in the repo - ok for me, thank you for these fixes!
> >> >> 
> >> >> The problem with ANEs is not stable and depends on the Moon phase.
> >>Test
> >> >> case was simple - any app with any ANE. I don't remember which one I
> >> >> used when was working on the issue. But since you took my code that
> >>was
> >> >> tested at the moment when I caught the issue, and tested by IntelliJ
> >> >> IDEA users for more than a year, it should be ok.
> >> >> 
> >> >> Truly speaking this fix is not 'fair', it is a sort of a workaround
> >>for
> >> >> the problem that lays somewhere at lower level of the fdb tool or
> >> >> debugging protocol. But it is safe and perfectly tested and it works,
> >> >>so 
> >> >> let it be.
> >> >> 
> >> >> Thanks again,
> >> >> Alexander
> >> >> 
> >> >> > It is commited already, from the tests I did, it is ok, wanted you
> >>to
> >> >>check as well, especially for ANE, I've got no test cases for that,
> >>Btw,
> >> >>if you have, can you share your test cases with me ? it would be
> >>great.
> >> >> 
> >> > 		 	   		  
> >> 
> > 		 	   		  
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alex Harui <ah...@adobe.com>.
Well, we need Alexander to attach it so it records it as a donation from
them.

It is optional whether to put your changes in the JIRA.  Folks might
prefer the jar over having the sources, but up to you.

Thanks to both of you,
-Alex

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

>Hi Alex,
>
>Yeah, I'm happy too, to be able to set breakpoints in runtime loaded
>modules now.
>
>I should have attached the idea fix sources, will do it right now and
>move the fixed fdb.jar to the parent issue as it should, in case users
>want to test / use it before the release.
>
>Thanks,
>Frédéric THOMAS
>
>> From: aharui@adobe.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>> Date: Thu, 16 Jan 2014 14:22:16 +0000
>> 
>> Yay Fred!  Great job!
>> 
>> Alexander, can you attach the FDB patches you gave to Fred to one of the
>> JIRA issues?  That way we can have a consistent way of tracking your
>> permission to use those patches.
>> 
>> Thanks,
>> -Alex
>> 
>> On 1/16/14 6:11 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
>> 
>> >No problemo, especially because most of those fixes came from you, so,
>> >many thanks to you :-)
>> >
>> >Btw, does it means the idea-fdb-fix will contains only the StringUtil /
>> >ExpressionCache fixes now ?
>> >I didn't integrated this fix because you told me it is more an IDE
>>thing
>> >and I didn't look at it closely, what impact it would be to integrate
>>it
>> >and using FDB standalone ?
>> >
>> >Thanks,
>> >Frédéric THOMAS
>> >
>> >> Date: Thu, 16 Jan 2014 18:00:05 +0400
>> >> From: alexander.doroshko@jetbrains.com
>> >> To: dev@flex.apache.org
>> >> Subject: Re: FDB vs FB debugging ?
>> >> 
>> >> Checked in the repo - ok for me, thank you for these fixes!
>> >> 
>> >> The problem with ANEs is not stable and depends on the Moon phase.
>>Test
>> >> case was simple - any app with any ANE. I don't remember which one I
>> >> used when was working on the issue. But since you took my code that
>>was
>> >> tested at the moment when I caught the issue, and tested by IntelliJ
>> >> IDEA users for more than a year, it should be ok.
>> >> 
>> >> Truly speaking this fix is not 'fair', it is a sort of a workaround
>>for
>> >> the problem that lays somewhere at lower level of the fdb tool or
>> >> debugging protocol. But it is safe and perfectly tested and it works,
>> >>so 
>> >> let it be.
>> >> 
>> >> Thanks again,
>> >> Alexander
>> >> 
>> >> > It is commited already, from the tests I did, it is ok, wanted you
>>to
>> >>check as well, especially for ANE, I've got no test cases for that,
>>Btw,
>> >>if you have, can you share your test cases with me ? it would be
>>great.
>> >> 
>> > 		 	   		  
>> 
> 		 	   		  


RE: FDB vs FB debugging ?

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

Yeah, I'm happy too, to be able to set breakpoints in runtime loaded modules now.

I should have attached the idea fix sources, will do it right now and move the fixed fdb.jar to the parent issue as it should, in case users want to test / use it before the release.

Thanks,
Frédéric THOMAS

> From: aharui@adobe.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> Date: Thu, 16 Jan 2014 14:22:16 +0000
> 
> Yay Fred!  Great job!
> 
> Alexander, can you attach the FDB patches you gave to Fred to one of the
> JIRA issues?  That way we can have a consistent way of tracking your
> permission to use those patches.
> 
> Thanks,
> -Alex
> 
> On 1/16/14 6:11 AM, "Frédéric THOMAS" <we...@hotmail.com> wrote:
> 
> >No problemo, especially because most of those fixes came from you, so,
> >many thanks to you :-)
> >
> >Btw, does it means the idea-fdb-fix will contains only the StringUtil /
> >ExpressionCache fixes now ?
> >I didn't integrated this fix because you told me it is more an IDE thing
> >and I didn't look at it closely, what impact it would be to integrate it
> >and using FDB standalone ?
> >
> >Thanks,
> >Frédéric THOMAS
> >
> >> Date: Thu, 16 Jan 2014 18:00:05 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: FDB vs FB debugging ?
> >> 
> >> Checked in the repo - ok for me, thank you for these fixes!
> >> 
> >> The problem with ANEs is not stable and depends on the Moon phase. Test
> >> case was simple - any app with any ANE. I don't remember which one I
> >> used when was working on the issue. But since you took my code that was
> >> tested at the moment when I caught the issue, and tested by IntelliJ
> >> IDEA users for more than a year, it should be ok.
> >> 
> >> Truly speaking this fix is not 'fair', it is a sort of a workaround for
> >> the problem that lays somewhere at lower level of the fdb tool or
> >> debugging protocol. But it is safe and perfectly tested and it works,
> >>so 
> >> let it be.
> >> 
> >> Thanks again,
> >> Alexander
> >> 
> >> > It is commited already, from the tests I did, it is ok, wanted you to
> >>check as well, especially for ANE, I've got no test cases for that, Btw,
> >>if you have, can you share your test cases with me ? it would be great.
> >> 
> > 		 	   		  
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alex Harui <ah...@adobe.com>.
Yay Fred!  Great job!

Alexander, can you attach the FDB patches you gave to Fred to one of the
JIRA issues?  That way we can have a consistent way of tracking your
permission to use those patches.

Thanks,
-Alex

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

>No problemo, especially because most of those fixes came from you, so,
>many thanks to you :-)
>
>Btw, does it means the idea-fdb-fix will contains only the StringUtil /
>ExpressionCache fixes now ?
>I didn't integrated this fix because you told me it is more an IDE thing
>and I didn't look at it closely, what impact it would be to integrate it
>and using FDB standalone ?
>
>Thanks,
>Frédéric THOMAS
>
>> Date: Thu, 16 Jan 2014 18:00:05 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>> 
>> Checked in the repo - ok for me, thank you for these fixes!
>> 
>> The problem with ANEs is not stable and depends on the Moon phase. Test
>> case was simple - any app with any ANE. I don't remember which one I
>> used when was working on the issue. But since you took my code that was
>> tested at the moment when I caught the issue, and tested by IntelliJ
>> IDEA users for more than a year, it should be ok.
>> 
>> Truly speaking this fix is not 'fair', it is a sort of a workaround for
>> the problem that lays somewhere at lower level of the fdb tool or
>> debugging protocol. But it is safe and perfectly tested and it works,
>>so 
>> let it be.
>> 
>> Thanks again,
>> Alexander
>> 
>> > It is commited already, from the tests I did, it is ok, wanted you to
>>check as well, especially for ANE, I've got no test cases for that, Btw,
>>if you have, can you share your test cases with me ? it would be great.
>> 
> 		 	   		  


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
The only drawback of doing this is that some static methods in ExpressionCache that are currently static should become instance methods, consuming a little bit more of memory, the difference is low because I can't see any cases where one has 1000s debugging sessions opened in the same time, so, it is acceptable IMO.

Frédéric THOMAS

> From: webdoublefx@hotmail.com
> To: dev@flex.apache.org
> Subject: RE: FDB vs FB debugging ?
> Date: Fri, 17 Jan 2014 10:59:37 +0000
> 
> Sounds good to me, I'll just rename IDEA- to IDE-  :-) and maybe keep -ide instead of -escaped-var-values if we need something else applied for IDEs later.
> 
> Any other thoughts ?
> 
> Thanks,
> Frédéric THOMAS
> 
> > Date: Fri, 17 Jan 2014 14:44:12 +0400
> > From: alexander.doroshko@jetbrains.com
> > To: dev@flex.apache.org
> > Subject: Re: FDB vs FB debugging ?
> > 
> > Yes, something like fdb -escaped-var-values.
> > If enabled then there's no need in start/end markers (like 
> > "IDEA-ESCAPE-START"/"IDEA-ESCAPE-END"), as var values are always 
> > escaped. Implementation of escape() method is there in my StringUtil class.
> > 
> > On 17.01.2014 14:33, Frédéric THOMAS wrote:
> > > hum, what do you mean, something like "fdb -ide" ?
> > >
> > > Frédéric THOMAS
> > >
> > >> Date: Fri, 17 Jan 2014 14:29:32 +0400
> > >> From: alexander.doroshko@jetbrains.com
> > >> To: dev@flex.apache.org
> > >> Subject: Re: FDB vs FB debugging ?
> > >>
> > >>> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
> > >> Or may be just add undocumented command line option.
> > >   		 	   		
> > 
>  		 	   		  
 		 	   		  

RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
Committed and built jar attached for testing purpose https://issues.apache.org/jira/browse/FLEX-34049

Thanks,
Frédéric THOMAS

> Date: Fri, 17 Jan 2014 15:38:31 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> As I said I think there's no need in XXX-START/XXX-END markers at all. 
> IDE that passed -ide param treats all var values as escaped.
> 
> On 17.01.2014 14:59, Frédéric THOMAS wrote:
> > Sounds good to me, I'll just rename IDEA- to IDE-  :-) and maybe keep -ide instead of -escaped-var-values if we need something else applied for IDEs later.
> >
> > Any other thoughts ?
> >
> > Thanks,
> > Frédéric THOMAS
> >
> >> Date: Fri, 17 Jan 2014 14:44:12 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: FDB vs FB debugging ?
> >>
> >> Yes, something like fdb -escaped-var-values.
> >> If enabled then there's no need in start/end markers (like
> >> "IDEA-ESCAPE-START"/"IDEA-ESCAPE-END"), as var values are always
> >> escaped. Implementation of escape() method is there in my StringUtil class.
> >>
> >> On 17.01.2014 14:33, Frédéric THOMAS wrote:
> >>> hum, what do you mean, something like "fdb -ide" ?
> >>>
> >>> Frédéric THOMAS
> >>>
> >>>> Date: Fri, 17 Jan 2014 14:29:32 +0400
> >>>> From: alexander.doroshko@jetbrains.com
> >>>> To: dev@flex.apache.org
> >>>> Subject: Re: FDB vs FB debugging ?
> >>>>
> >>>>> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
> >>>> Or may be just add undocumented command line option.
> >>>    		 	   		
> >   		 	   		
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
As I said I think there's no need in XXX-START/XXX-END markers at all. 
IDE that passed -ide param treats all var values as escaped.

On 17.01.2014 14:59, Frédéric THOMAS wrote:
> Sounds good to me, I'll just rename IDEA- to IDE-  :-) and maybe keep -ide instead of -escaped-var-values if we need something else applied for IDEs later.
>
> Any other thoughts ?
>
> Thanks,
> Frédéric THOMAS
>
>> Date: Fri, 17 Jan 2014 14:44:12 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>>
>> Yes, something like fdb -escaped-var-values.
>> If enabled then there's no need in start/end markers (like
>> "IDEA-ESCAPE-START"/"IDEA-ESCAPE-END"), as var values are always
>> escaped. Implementation of escape() method is there in my StringUtil class.
>>
>> On 17.01.2014 14:33, Frédéric THOMAS wrote:
>>> hum, what do you mean, something like "fdb -ide" ?
>>>
>>> Frédéric THOMAS
>>>
>>>> Date: Fri, 17 Jan 2014 14:29:32 +0400
>>>> From: alexander.doroshko@jetbrains.com
>>>> To: dev@flex.apache.org
>>>> Subject: Re: FDB vs FB debugging ?
>>>>
>>>>> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
>>>> Or may be just add undocumented command line option.
>>>    		 	   		
>   		 	   		


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
Sounds good to me, I'll just rename IDEA- to IDE-  :-) and maybe keep -ide instead of -escaped-var-values if we need something else applied for IDEs later.

Any other thoughts ?

Thanks,
Frédéric THOMAS

> Date: Fri, 17 Jan 2014 14:44:12 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> Yes, something like fdb -escaped-var-values.
> If enabled then there's no need in start/end markers (like 
> "IDEA-ESCAPE-START"/"IDEA-ESCAPE-END"), as var values are always 
> escaped. Implementation of escape() method is there in my StringUtil class.
> 
> On 17.01.2014 14:33, Frédéric THOMAS wrote:
> > hum, what do you mean, something like "fdb -ide" ?
> >
> > Frédéric THOMAS
> >
> >> Date: Fri, 17 Jan 2014 14:29:32 +0400
> >> From: alexander.doroshko@jetbrains.com
> >> To: dev@flex.apache.org
> >> Subject: Re: FDB vs FB debugging ?
> >>
> >>> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
> >> Or may be just add undocumented command line option.
> >   		 	   		
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
Yes, something like fdb -escaped-var-values.
If enabled then there's no need in start/end markers (like 
"IDEA-ESCAPE-START"/"IDEA-ESCAPE-END"), as var values are always 
escaped. Implementation of escape() method is there in my StringUtil class.

On 17.01.2014 14:33, Frédéric THOMAS wrote:
> hum, what do you mean, something like "fdb -ide" ?
>
> Frédéric THOMAS
>
>> Date: Fri, 17 Jan 2014 14:29:32 +0400
>> From: alexander.doroshko@jetbrains.com
>> To: dev@flex.apache.org
>> Subject: Re: FDB vs FB debugging ?
>>
>>> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
>> Or may be just add undocumented command line option.
>   		 	   		


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
hum, what do you mean, something like "fdb -ide" ?

Frédéric THOMAS

> Date: Fri, 17 Jan 2014 14:29:32 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> > Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?
> 
> Or may be just add undocumented command line option.
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
> Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?

Or may be just add undocumented command line option.

RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
Oh, I missed this one yesterday apparently.

Ok, I got your point, the only thing I'm thinking about could be to introduce a new first level helper command which would set a boolean value to apply this escapes, does it make sense ?

Thanks,
Frédéric THOMAS

> Date: Thu, 16 Jan 2014 18:26:36 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> 
> > Btw, does it means the idea-fdb-fix will contains only the StringUtil / ExpressionCache fixes now ?
> Yes
> > I didn't integrated this fix because you told me it is more an IDE thing and I didn't look at it closely, what impact it would be to integrate it and using FDB standalone ?
> The fix escapes special symbols and surrounds result with 
> "IDEA-ESCAPE-START" and "IDEA-ESCAPE-END", so that's not something that 
> can go to Apache repo.
> The problem that is solves is to distinguish line break in fdb output 
> that means 'fdb message finished' from line breaks that are inside 
> printed string var value.
> For example (using Java string syntax) "myString = a \n b" (with real 
> line break char) becomes "myString = IDEA-ESCAPE-STARTa \\n 
> bIDEA-ESCAPE-END" (without real line break char).
> This is not a problem for command line fdb usage, but may be a big 
> problem for IDE. May be you can suggest a solution that works both for 
> IDE and command line.
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
> Btw, does it means the idea-fdb-fix will contains only the StringUtil / ExpressionCache fixes now ?
Yes
> I didn't integrated this fix because you told me it is more an IDE thing and I didn't look at it closely, what impact it would be to integrate it and using FDB standalone ?
The fix escapes special symbols and surrounds result with 
"IDEA-ESCAPE-START" and "IDEA-ESCAPE-END", so that's not something that 
can go to Apache repo.
The problem that is solves is to distinguish line break in fdb output 
that means 'fdb message finished' from line breaks that are inside 
printed string var value.
For example (using Java string syntax) "myString = a \n b" (with real 
line break char) becomes "myString = IDEA-ESCAPE-STARTa \\n 
bIDEA-ESCAPE-END" (without real line break char).
This is not a problem for command line fdb usage, but may be a big 
problem for IDE. May be you can suggest a solution that works both for 
IDE and command line.

RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
No problemo, especially because most of those fixes came from you, so, many thanks to you :-)

Btw, does it means the idea-fdb-fix will contains only the StringUtil / ExpressionCache fixes now ?
I didn't integrated this fix because you told me it is more an IDE thing and I didn't look at it closely, what impact it would be to integrate it and using FDB standalone ?

Thanks,
Frédéric THOMAS

> Date: Thu, 16 Jan 2014 18:00:05 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> Checked in the repo - ok for me, thank you for these fixes!
> 
> The problem with ANEs is not stable and depends on the Moon phase. Test 
> case was simple - any app with any ANE. I don't remember which one I 
> used when was working on the issue. But since you took my code that was 
> tested at the moment when I caught the issue, and tested by IntelliJ 
> IDEA users for more than a year, it should be ok.
> 
> Truly speaking this fix is not 'fair', it is a sort of a workaround for 
> the problem that lays somewhere at lower level of the fdb tool or 
> debugging protocol. But it is safe and perfectly tested and it works, so 
> let it be.
> 
> Thanks again,
> Alexander
> 
> > It is commited already, from the tests I did, it is ok, wanted you to check as well, especially for ANE, I've got no test cases for that, Btw, if you have, can you share your test cases with me ? it would be great.
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
Checked in the repo - ok for me, thank you for these fixes!

The problem with ANEs is not stable and depends on the Moon phase. Test 
case was simple - any app with any ANE. I don't remember which one I 
used when was working on the issue. But since you took my code that was 
tested at the moment when I caught the issue, and tested by IntelliJ 
IDEA users for more than a year, it should be ok.

Truly speaking this fix is not 'fair', it is a sort of a workaround for 
the problem that lays somewhere at lower level of the fdb tool or 
debugging protocol. But it is safe and perfectly tested and it works, so 
let it be.

Thanks again,
Alexander

> It is commited already, from the tests I did, it is ok, wanted you to check as well, especially for ANE, I've got no test cases for that, Btw, if you have, can you share your test cases with me ? it would be great.


RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
It is commited already, from the tests I did, it is ok, wanted you to check as well, especially for ANE, I've got no test cases for that, Btw, if you have, can you share your test cases with me ? it would be great.

Thanks,
Frédéric THOMAS

> Date: Thu, 16 Jan 2014 17:36:02 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> Looks good! May I take a look at the final DebugCLI.java source code?
> > Hi Alexander,
> >
> > Just attached the fixed fdb.jar for test in the JIRA parent [1] with all your changes except the 1st one + the current fixed issue, can you check it works with all the test cases you have.
> >
> > Thanks,
> > Frédéric THOMAS
> >
> > [1] https://issues.apache.org/jira/browse/FLEX-34042
> >
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
Looks good! May I take a look at the final DebugCLI.java source code?
> Hi Alexander,
>
> Just attached the fixed fdb.jar for test in the JIRA parent [1] with all your changes except the 1st one + the current fixed issue, can you check it works with all the test cases you have.
>
> Thanks,
> Frédéric THOMAS
>
> [1] https://issues.apache.org/jira/browse/FLEX-34042
>


RE: FDB vs FB debugging ?

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

Just attached the fixed fdb.jar for test in the JIRA parent [1] with all your changes except the 1st one + the current fixed issue, can you check it works with all the test cases you have.

Thanks,
Frédéric THOMAS

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

> Date: Wed, 15 Jan 2014 15:53:58 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> > Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
> Source code for my patch can be found in [IntelliJ IDEA 
> Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
> It solves some issues:
> 
> 1. escapes CRLF and some other special chars in fdb output that makes it 
> easier to work with it at IDE side
> 
> 2. adds file id to the stack info printed by fdb (line 1182 in original 
> file == line 1178 in my patch)
> 
> boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);
> 
> 3. prints full stack if Flash Player detects not handled exception 
> (original fdb prints only error message).
> 
> See void dumpFaultLine(FaultEvent e){...}
> 
> 4. The most important fix is inside findAndEnableBreak(...) method 
> implementation and it solves the following issues:
> 
> Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)
> 
> Breakpoints in ActionScript files do not work when debugging app using ANE
> (http://youtrack.jetbrains.com/issue/IDEA-94128)
> 
> 
> I think all fixes except the first one can be added to Apache repo. All 
> of them are in a DebugCLI.java file. The most important is the 4th case 
> with breakpoints not working without a fix.
> 
> Alexander
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
> Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for?
Source code for my patch can be found in [IntelliJ IDEA 
Installation]/plugins/flex/lib/idea-fdb-4.5.0.20967-fix_src.zip.
It solves some issues:

1. escapes CRLF and some other special chars in fdb output that makes it 
easier to work with it at IDE side

2. adds file id to the stack info printed by fdb (line 1182 in original 
file == line 1178 in my patch)

boolean valid = appendFrameInfo(sb, frame, i, showThis, false);*=>*  boolean valid = appendFrameInfo(sb, frame, i, showThis, true);

3. prints full stack if Flash Player detects not handled exception 
(original fdb prints only error message).

See void dumpFaultLine(FaultEvent e){...}

4. The most important fix is inside findAndEnableBreak(...) method 
implementation and it solves the following issues:

Impossible to set breakpoint in MXML files that contains item renderer (http://youtrack.jetbrains.com/issue/IDEA-57546)

Breakpoints in ActionScript files do not work when debugging app using ANE
(http://youtrack.jetbrains.com/issue/IDEA-94128)


I think all fixes except the first one can be added to Apache repo. All 
of them are in a DebugCLI.java file. The most important is the 4th case 
with breakpoints not working without a fix.

Alexander

RE: FDB vs FB debugging ?

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

Will build the SDK this afternoon on my office computer (not a thing I wanted to do as I haven't any allocated time for that) and will try to use your uploaded project, thanks a lot.

Btw, while you here, can you tell me what C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\flex\lib\idea-fdb-4.5.0.20967-fix.jar is for ? (I think to remember it is something about a fix relative to the inner MXML tag->AS3 code but not sure, if it is the case, is that can be fixed from inside the Apache Flex project ?)

PS: I tried already to use the AIR FDB with no luck :P

Frédéric THOMAS

> Date: Wed, 15 Jan 2014 14:37:24 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> Hi,
> in my understanding FB uses the same low-level (protocol) code as FDB, 
> but a bit different high-level wrapper. Since FB is not open-sourced I 
> don't know what is the difference.
> 
> I recommend you to try using FDB from Adobe AIR SDK bundle that includes 
> ASC 2.0. FDB tool bundled there is very much different from what is in 
> the Apache Flex SDK and it usually works better. You do not have to 
> switch your project to AIR SDK in IntelliJ, it is enough to configure 
> AIR SDK in Project Stucture | SDKs and select it in 'Use debugger from 
> SDK' field in the Flash App Run Configuration dialog (Run | Edit 
> Configurations).
> 
> If you have time to debug FDB tool itself - it is rather easy to do. 
> I've uploaded IntelliJ IDEA project files to 
> https://drive.google.com/file/d/0B08iHspLVQF0bUI3NF8xd2NLNVE/edit?usp=sharing. 
> 
> You need to have Apache Flex SDK built locally from sources, because my 
> project structure is not 'fair' - it relies on some jars that are built 
> during standard SDK build process by ant.
> Unpack attached zip in the 'sdk' root repository folder and open the 
> project in IntelliJ IDEA. There's already DebugCLI run configuration 
> created, so just click Debug button, after compilation you'll get fdb 
> greeting in the Debug tool window.
> 
> Alexander
> 
> On 14.01.2014 22:18, Frédéric THOMAS wrote:
> > Hi,
> >
> > I'm facing an issue using IntelliJ or FDB directly to debug multi-module projects then tried with FB and had no problems, maybe someone can enlighten me regarding the differences, basically, the issue is that I can't set a breakpoint in a module, these are the returned messages "Breakpoint not set; no executable code at line" or "There is no executable code on the specified line" :
> ...
> > Thanks,
> > Frédéric THOMAS 		 	   		
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
> Is it in your plan to add RSL support into IntelliJ ?
>
> I mean extract the swf from the swc to a user location and compute digest as does the RSLMojoCreator class from flexmojos.
> This lack of feature force us to build via maven only or to have a profile where everything is merged into memory extending the compilation time a lot.

The answer is 'yes', but unfortunately I can't give any ETA for that.

RE: FDB vs FB debugging ?

Posted by Frédéric THOMAS <we...@hotmail.com>.
"in my understanding FB uses the same low-level (protocol) code as FDB, 
but a bit different high-level wrapper. Since FB is not open-sourced I 
don't know what is the difference."

Yeah, probably the reason why it doesn't take the "-include-file" compiler arguments into account which sucks :)
Even worse for the "-output" argument where it spit out an error even from a xml config file which make impossible to rename the built swf.
Happily, it works perfectly with IJ :)

Btw, another point, I wrote something on the Jetbrains dev already but:

Is it in your plan to add RSL support into IntelliJ ? 

I mean extract the swf from the swc to a user location and compute digest as does the RSLMojoCreator class from flexmojos.
This lack of feature force us to build via maven only or to have a profile where everything is merged into memory extending the compilation time a lot.
Thanks,
Frédéric THOMAS

> Date: Wed, 15 Jan 2014 14:37:24 +0400
> From: alexander.doroshko@jetbrains.com
> To: dev@flex.apache.org
> Subject: Re: FDB vs FB debugging ?
> 
> Hi,
> in my understanding FB uses the same low-level (protocol) code as FDB, 
> but a bit different high-level wrapper. Since FB is not open-sourced I 
> don't know what is the difference.
> 
> I recommend you to try using FDB from Adobe AIR SDK bundle that includes 
> ASC 2.0. FDB tool bundled there is very much different from what is in 
> the Apache Flex SDK and it usually works better. You do not have to 
> switch your project to AIR SDK in IntelliJ, it is enough to configure 
> AIR SDK in Project Stucture | SDKs and select it in 'Use debugger from 
> SDK' field in the Flash App Run Configuration dialog (Run | Edit 
> Configurations).
> 
> If you have time to debug FDB tool itself - it is rather easy to do. 
> I've uploaded IntelliJ IDEA project files to 
> https://drive.google.com/file/d/0B08iHspLVQF0bUI3NF8xd2NLNVE/edit?usp=sharing. 
> 
> You need to have Apache Flex SDK built locally from sources, because my 
> project structure is not 'fair' - it relies on some jars that are built 
> during standard SDK build process by ant.
> Unpack attached zip in the 'sdk' root repository folder and open the 
> project in IntelliJ IDEA. There's already DebugCLI run configuration 
> created, so just click Debug button, after compilation you'll get fdb 
> greeting in the Debug tool window.
> 
> Alexander
> 
> On 14.01.2014 22:18, Frédéric THOMAS wrote:
> > Hi,
> >
> > I'm facing an issue using IntelliJ or FDB directly to debug multi-module projects then tried with FB and had no problems, maybe someone can enlighten me regarding the differences, basically, the issue is that I can't set a breakpoint in a module, these are the returned messages "Breakpoint not set; no executable code at line" or "There is no executable code on the specified line" :
> ...
> > Thanks,
> > Frédéric THOMAS 		 	   		
> 
 		 	   		  

Re: FDB vs FB debugging ?

Posted by Alexander Doroshko <al...@jetbrains.com>.
Hi,
in my understanding FB uses the same low-level (protocol) code as FDB, 
but a bit different high-level wrapper. Since FB is not open-sourced I 
don't know what is the difference.

I recommend you to try using FDB from Adobe AIR SDK bundle that includes 
ASC 2.0. FDB tool bundled there is very much different from what is in 
the Apache Flex SDK and it usually works better. You do not have to 
switch your project to AIR SDK in IntelliJ, it is enough to configure 
AIR SDK in Project Stucture | SDKs and select it in 'Use debugger from 
SDK' field in the Flash App Run Configuration dialog (Run | Edit 
Configurations).

If you have time to debug FDB tool itself - it is rather easy to do. 
I've uploaded IntelliJ IDEA project files to 
https://drive.google.com/file/d/0B08iHspLVQF0bUI3NF8xd2NLNVE/edit?usp=sharing. 

You need to have Apache Flex SDK built locally from sources, because my 
project structure is not 'fair' - it relies on some jars that are built 
during standard SDK build process by ant.
Unpack attached zip in the 'sdk' root repository folder and open the 
project in IntelliJ IDEA. There's already DebugCLI run configuration 
created, so just click Debug button, after compilation you'll get fdb 
greeting in the Debug tool window.

Alexander

On 14.01.2014 22:18, Frédéric THOMAS wrote:
> Hi,
>
> I'm facing an issue using IntelliJ or FDB directly to debug multi-module projects then tried with FB and had no problems, maybe someone can enlighten me regarding the differences, basically, the issue is that I can't set a breakpoint in a module, these are the returned messages "Breakpoint not set; no executable code at line" or "There is no executable code on the specified line" :
...
> Thanks,
> Frédéric THOMAS 		 	   		


Re: FDB vs FB debugging ?

Posted by Alex Harui <ah...@adobe.com>.
I get that in FDB if the module isn't compiled with the debug flag, or the
module is stale so there is no matching code at that line after the source
code changed.

HTH,
-Alex

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

>Hi,
>
>I'm facing an issue using IntelliJ or FDB directly to debug multi-module
>projects then tried with FB and had no problems, maybe someone can
>enlighten me regarding the differences, basically, the issue is that I
>can't set a breakpoint in a module, these are the returned messages
>"Breakpoint not set; no executable code at line" or "There is no
>executable code on the specified line" :
>
>
>In FDB:
>
>[SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/2 - 3á918 bytes after
>decompression
>[SWF] 
>//Memotech60PT/UI/modules/Authentication/AuthenticationModule-en_US.swf -
>341á370 bytes after decompression
>[SWF] //Memotech60PT/UI/modules/Authentication/AuthenticationModule.swf -
>6á135á818 bytes after decompression
>Additional ActionScript code has been loaded from a SWF or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>
>(fdb) info files Aut*
>AuthenticateUserCommand.as#2400
>AuthenticateUserEvent.as#1043
>AuthenticationTicket.as#596
>AuthorizationControl.as#971
>AuthorizationEvent.as#1670
>AuthorizationManger.as#927
>AuthorizationServiceDelegate.as#2682
>AutoComplete.mxml#1632
>AutoCompleteItemRemoveEvent.as#947
>AutoSizeTree.as#3133
>
>(fdb) continue
>Additional ActionScript code has been loaded from a SWF or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>
>(fdb) info files Aut*
>AuthenticateUserCommand.as#2400
>AuthenticateUserEvent.as#1043
>AuthenticationModule.mxml#4949
>AuthenticationTicket.as#596
>AuthorizationControl.as#971
>AuthorizationEvent.as#1670
>AuthorizationManger.as#927
>AuthorizationServiceDelegate.as#2682
>AutoComplete.mxml#1632
>AutoCompleteItemRemoveEvent.as#947
>AutoSizeTree.as#3133
>
>(fdb) list AuthenticationModule.mxml:37
> 32
> 33          [Bindable]
> 34          public var _accCtrlModel : AccessControlServiceModelLocator
>= AccessControlServiceModelLocator.getInstance();
> 35
> 36          override protected function initHandler() : void {
> 37            resetLocalization();
> 38          }
> 39
> 40          private function displayChangePwdForm( event : Event ) :
>void {
> 41            this.currentState = "PasswordChange";
> 
>(fdb) file AuthenticationModule.mxml
>(fdb) break 37
>Breakpoint not set; no executable code at line 37 of
>AuthenticationModule.mxml#4949
>(fdb)
>
>-----------------------------------------------
>In IntelliJ after having configured the logs correctly:
>
>2014-01-14 16:20:54,227 [ 120523]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454227 Apache fdb (Flash Player Debugger) [build 0]
>2014-01-14 16:20:54,227 [ 120523]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454227 Processed by
>com.intellij.lang.javascript.flex.debug.FlexDebugProcess$ReadGreetingComma
>nd 
>2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454230 Sent:run
>2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454230 Copyright 2013 The Apache Software Foundation.
>2014-01-14 16:20:54,230 [ 120526]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454230 Processed by
>com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserComm
>and 
>2014-01-14 16:20:54,326 [ 120622]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454326 Waiting for Player to connect
>2014-01-14 16:20:54,326 [ 120622]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716454326 Processed by
>com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserComm
>and 
>2014-01-14 16:20:54,441 [ 120737]   INFO - s.impl.stores.FileBasedStorage
>- Document was not loaded for $APP_CONFIG$/consoleFolding.xml file is
>null 
>2014-01-14 16:20:55,245 [ 121541]   INFO - ellij.concurrency.JobScheduler
>- 50 ms execution limit failed for:
>com.intellij.openapi.progress.impl.ProgressManagerImpl$1@169bf512;
>elapsed time was 75ms
>2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461021 Player connected; session starting.
>Set breakpoints and then type 'continue' to resume the session.
>[SWF] //Memotech60PT/UI/shell.swf - 14,919,314 bytes after decompression
>2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461021 Processed by
>com.intellij.lang.javascript.flex.debug.FlexDebugProcess$LaunchBrowserComm
>and 
>2014-01-14 16:21:01,021 [ 127317]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461021 Sent:break Authentication.AuthenticationModule.mxml:37
>2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461045 Breakpoint 1 created, but not yet resolved.
>The breakpoint will be resolved when the corresponding file or function
>is loaded. 
>2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461045 Processed by
>com.intellij.lang.javascript.flex.debug.FlexBreakpointsHandler$InsertBreak
>pointCommand 
>2014-01-14 16:21:01,045 [ 127341]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716461045 Sent:continue
>2014-01-14 16:21:03,520 [ 129816]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716463520 Additional ActionScript code has been loaded from a SWF
>or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>2014-01-14 16:21:03,520 [ 129816]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716463520 Sent:continue
>2014-01-14 16:21:04,834 [ 131130]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716464834 [SWF] //Memotech60PT/UI/ApplicationResources-en_US.swf -
>436,155 bytes after decompression
>2014-01-14 16:21:04,935 [ 131231]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716464935 [SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/1 - 3,918
>bytes after decompression
>2014-01-14 16:21:05,646 [ 131942]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716465646 [SWF]
>//Memotech60PT/UI/modules/UserReports/UserReportsModule-en_US.swf -
>341,044 bytes after decompression
>2014-01-14 16:21:05,747 [ 132043]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716465747 [SWF]
>//Memotech60PT/UI/modules/UserReports/UserReportsModule.swf - 9,757,814
>bytes after decompression
>2014-01-14 16:21:25,914 [ 152210]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716485914 Additional ActionScript code has been loaded from a SWF
>or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>2014-01-14 16:21:25,914 [ 152210]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716485914 Sent:continue
>2014-01-14 16:21:47,948 [ 174244]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716507948 Additional ActionScript code has been loaded from a SWF
>or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>2014-01-14 16:21:47,949 [ 174245]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716507949 Sent:continue
>2014-01-14 16:21:48,642 [ 174938]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716508642 [trace] warning: The class
>Memotech.PatentComponent.Services.vo.DocketingWorkbench has been used in
>a call to net.registerClassAlias() in _UserReportsModule_FlexInit. This
>will cause UserReports:UserReportsModule to be leaked. To resolve the
>leak, define Memotech.PatentComponent.Services.vo.DocketingWorkbench in
>the top-level application.
>[trace] warning: The class
>Memotech.TrademarkComponent.Services.vo.DocketingWorkbench has been used
>in a call to net.registerClassAlias() in _UserReportsModule_FlexInit.
>This will cause UserReports:UserReportsModule to be leaked. To resolve
>the leak, define 
>Memotech.TrademarkComponent.Services.vo.DocketingWorkbench in the
>top-level application.
>2014-01-14 16:21:48,747 [ 175043]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716508747 [SWF] //Memotech60PT/UI/shell.swf/[[DYNAMIC]]/2 - 3,918
>bytes after decompression
>2014-01-14 16:21:48,860 [ 175156]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716508860 [SWF]
>//Memotech60PT/UI/modules/Authentication/AuthenticationModule-en_US.swf -
>341,370 bytes after decompression
>2014-01-14 16:21:48,961 [ 175257]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716508961 [SWF]
>//Memotech60PT/UI/modules/Authentication/AuthenticationModule.swf -
>6,135,818 bytes after decompression
>2014-01-14 16:22:08,972 [ 195268]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716528972 Additional ActionScript code has been loaded from a SWF
>or a frame.
>To see all currently loaded files, type 'info files'.
>Set additional breakpoints as desired, and then type 'continue'.
>2014-01-14 16:22:08,972 [ 195268]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716528972 Sent:continue
>2014-01-14 16:22:30,006 [ 216302]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716550006 Additional ActionScript code has been loaded from a SWF
>or a frame.
>To see all currently loaded files, type 'info files'.
>Attempting to resolve breakpoint 1, expression
>"Authentication.AuthenticationModule.mxml:37":
>There is no executable code on the specified line.
>Fix or remove bad breakpoints, then type 'continue'.
>2014-01-14 16:22:30,012 [ 216308]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716550012 Sent:continue
>2014-01-14 16:22:33,665 [ 219961]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716553665 [UnloadSWF] //Memotech60PT/UI/shell.swf
>2014-01-14 16:22:33,768 [ 220064]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716553768 Player session terminated
> 
>2014-01-14 16:22:33,773 [ 220069]  DEBUG - pt.flex.debug.FlexDebugProcess
>- 1389716553773 Sent:quit
>
>Thanks,
>Frédéric THOMAS