You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Josh Tynjala <jo...@bowlerhat.dev> on 2020/01/15 22:52:40 UTC

How to keep trace() in release build?

I see that Language.trace() has a @royaledebug doc tag, which seems to
remove it from a release build. I just spent half an hour trying to figure
out why some event listeners weren't being called. Turns out that they
were, in fact, being called. Instead, the compiler was silently removing
some of my code. Is there a way to turn that off and keep trace() in a
release build?

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>

Re: How to keep trace() in release build?

Posted by Harbs <ha...@gmail.com>.
> Yeah, that's what I generally do as well.

Ditto.

> On Jan 16, 2020, at 1:27 AM, Greg Dove <gr...@gmail.com> wrote:
> 
> Yeah, that's what I generally do as well.
> 
> Not sure if you are working across swf and js at the same time... if I am
> comparing swf stuff with js, I like to have both in the js console, in
> which case I do something like this:
> https://github.com/apache/royale-asjs/blob/develop/examples/crux/CruxQuickStart/src/main/royale/tracer.as
> 
> 
> 
> 
> On Thu, Jan 16, 2020 at 12:23 PM Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> 
>> As a temporary workaround, I was able to use console.log() instead.
>> 
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>> 
>> 
>> On Wed, Jan 15, 2020 at 2:52 PM Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>> 
>>> I see that Language.trace() has a @royaledebug doc tag, which seems to
>>> remove it from a release build. I just spent half an hour trying to
>> figure
>>> out why some event listeners weren't being called. Turns out that they
>>> were, in fact, being called. Instead, the compiler was silently removing
>>> some of my code. Is there a way to turn that off and keep trace() in a
>>> release build?
>>> 
>>> --
>>> Josh Tynjala
>>> Bowler Hat LLC <https://bowlerhat.dev>
>>> 
>> 


Re: How to keep trace() in release build?

Posted by Greg Dove <gr...@gmail.com>.
Yeah, that's what I generally do as well.

Not sure if you are working across swf and js at the same time... if I am
comparing swf stuff with js, I like to have both in the js console, in
which case I do something like this:
https://github.com/apache/royale-asjs/blob/develop/examples/crux/CruxQuickStart/src/main/royale/tracer.as




On Thu, Jan 16, 2020 at 12:23 PM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> As a temporary workaround, I was able to use console.log() instead.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Wed, Jan 15, 2020 at 2:52 PM Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
>
> > I see that Language.trace() has a @royaledebug doc tag, which seems to
> > remove it from a release build. I just spent half an hour trying to
> figure
> > out why some event listeners weren't being called. Turns out that they
> > were, in fact, being called. Instead, the compiler was silently removing
> > some of my code. Is there a way to turn that off and keep trace() in a
> > release build?
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
>

Re: How to keep trace() in release build?

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
As a temporary workaround, I was able to use console.log() instead.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Wed, Jan 15, 2020 at 2:52 PM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> I see that Language.trace() has a @royaledebug doc tag, which seems to
> remove it from a release build. I just spent half an hour trying to figure
> out why some event listeners weren't being called. Turns out that they
> were, in fact, being called. Instead, the compiler was silently removing
> some of my code. Is there a way to turn that off and keep trace() in a
> release build?
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>