Debugger statement

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Debugger statement

Josh Tynjala
If there are no objections in the next 24 hours, I plan to merge my
"feature/debugger-statement" branch that adds a "debugger" statement to
ActionScript similar to the one available in JS.

Use of the debugger statement is completely optional, but it's a useful way
to trigger the debugger from code in a cross-platform way. In other words,
the following code will just work whether you're running the generated JS
or SWF:

if(x > 100)
{
    debugger;
}

- Josh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugger statement

piotrz
Hi Josh,

+1.

Unfortunately didn't have time to try this one, but it seems to be very useful and I will definitely make an first attempt of use when I get my hands back onto framework code. :)

Thank you for this feature!
Piotr
Apache Flex PMC
piotrzarzycki21@gmail.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugger statement

OmPrakash Muppirala
In reply to this post by Josh Tynjala
+1

I so used to doing this nowadays.  Also, this is very useful when we want
to debug Node.js applications.  There is no good way to setup debug points
the first time with Node.js applications.

Thanks,
Om

On Mon, Jul 31, 2017 at 3:01 PM, Josh Tynjala <[hidden email]> wrote:

> If there are no objections in the next 24 hours, I plan to merge my
> "feature/debugger-statement" branch that adds a "debugger" statement to
> ActionScript similar to the one available in JS.
>
> Use of the debugger statement is completely optional, but it's a useful way
> to trigger the debugger from code in a cross-platform way. In other words,
> the following code will just work whether you're running the generated JS
> or SWF:
>
> if(x > 100)
> {
>     debugger;
> }
>
> - Josh
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugger statement

Alex Harui-2
In reply to this post by Josh Tynjala
I'm still trying to get the ok to use undocumented APIs without violating
the Flash EULA which prohibits reverse-engineering.  Could just make it
JS-only for now.

-Alex

On 7/31/17, 3:01 PM, "Josh Tynjala" <[hidden email]> wrote:

>If there are no objections in the next 24 hours, I plan to merge my
>"feature/debugger-statement" branch that adds a "debugger" statement to
>ActionScript similar to the one available in JS.
>
>Use of the debugger statement is completely optional, but it's a useful
>way
>to trigger the debugger from code in a cross-platform way. In other words,
>the following code will just work whether you're running the generated JS
>or SWF:
>
>if(x > 100)
>{
>    debugger;
>}
>
>- Josh

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugger statement

Josh Tynjala
Would it be helpful if someone from Adobe talked about
flash.debugger.enterDebugger() publicly? I assume that user mmorearty on
the official Adobe forums may be Mike Morearty from the Flex team, and he
mentions it in this thread:

https://forums.adobe.com/thread/247021

- Josh

On Mon, Jul 31, 2017 at 5:46 PM, Alex Harui <[hidden email]>
wrote:

> I'm still trying to get the ok to use undocumented APIs without violating
> the Flash EULA which prohibits reverse-engineering.  Could just make it
> JS-only for now.
>
> -Alex
>
> On 7/31/17, 3:01 PM, "Josh Tynjala" <[hidden email]> wrote:
>
> >If there are no objections in the next 24 hours, I plan to merge my
> >"feature/debugger-statement" branch that adds a "debugger" statement to
> >ActionScript similar to the one available in JS.
> >
> >Use of the debugger statement is completely optional, but it's a useful
> >way
> >to trigger the debugger from code in a cross-platform way. In other words,
> >the following code will just work whether you're running the generated JS
> >or SWF:
> >
> >if(x > 100)
> >{
> >    debugger;
> >}
> >
> >- Josh
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Debugger statement

Alex Harui-2
I'll pass that on to my manager, but I don't think that will be the key
argument.  I've mentioned lots of mx_internal APIs over the years and they
were also considered undocumented.

My argument right now, which I hope will win, is that discovery of any
API, not just this one, by examining open source is not reverse
engineering.  I was unable to find the original Tamarin source, but Red
Tamarin does have enterDebugger and assuming they did not get it via
rummaging through playerglobal.swc, then it might be ok to use, but remain
undocumented, which means it could get pulled from or modified by future
flash player revisions but Apache Flex could still use it.

FWIW, I did not know about enterDebugger myself, so I often just wrote
code that did:

if (somecondition)
  trace("stop here");

And set a breakpoint on that trace statement.  You could always do that
for now and instruct folks to set a breakpoint on that line of code.

Thoughts?
-Alex

On 8/1/17, 6:47 AM, "Josh Tynjala" <[hidden email]> wrote:

>Would it be helpful if someone from Adobe talked about
>flash.debugger.enterDebugger() publicly? I assume that user mmorearty on
>the official Adobe forums may be Mike Morearty from the Flex team, and he
>mentions it in this thread:
>
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforums.ad
>obe.com%2Fthread%2F247021&data=02%7C01%7C%7C323d3bb38210471a563d08d4d8e3ff
>b5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636371921136496388&sdata=L
>EuZYzHxshbJ3PpcNRvy96KC2SF2yOUPUSuHpYZYrvQ%3D&reserved=0
>
>- Josh
>
>On Mon, Jul 31, 2017 at 5:46 PM, Alex Harui <[hidden email]>
>wrote:
>
>> I'm still trying to get the ok to use undocumented APIs without
>>violating
>> the Flash EULA which prohibits reverse-engineering.  Could just make it
>> JS-only for now.
>>
>> -Alex
>>
>> On 7/31/17, 3:01 PM, "Josh Tynjala" <[hidden email]> wrote:
>>
>> >If there are no objections in the next 24 hours, I plan to merge my
>> >"feature/debugger-statement" branch that adds a "debugger" statement to
>> >ActionScript similar to the one available in JS.
>> >
>> >Use of the debugger statement is completely optional, but it's a useful
>> >way
>> >to trigger the debugger from code in a cross-platform way. In other
>>words,
>> >the following code will just work whether you're running the generated
>>JS
>> >or SWF:
>> >
>> >if(x > 100)
>> >{
>> >    debugger;
>> >}
>> >
>> >- Josh
>>
>>

Loading...