Thank you.
If any one in the future search on the mailing list:
Add -define+=CONFIG::DEBUG,true to the additionalOptions of the VS Code.
Example of usage:
private function onRemoteServiceFault(event:FaultEvent):void
{
CONFIG::DEBUG
{
Toast.showError(event.message.detail);
return;
}
Toast.showError(LocaleManager.getInstance().localeStrings.GlobalError);
}
I my case I wanted to show a generic message to contact the support if
something goes wrong and a detailed technical message when I'mm working in
a debug mode.
Don't forget to change CONFIG::DEBUG,true to CONFIG::DEBUG,false before
compile to release.
Yishay Weiss <[email protected]> escreveu no dia sábado, 12/11/2022
à(s) 07:35:
> I think you can use compiler.define [1]
>
> [1] Compiler Options (apache.github.io)<
> https://apache.github.io/royale-docs/compiler/compiler-options>
>
> From: Hugo Ferreira<mailto:[email protected]>
> Sent: Saturday, November 12, 2022 1:31 AM
> To: [email protected]<mailto:[email protected]>
> Subject: Debug mode
>
> Hi,
>
> There is any way/global variable/etc ... to check if the code is running in
> debug mode using VS Code ?
>
> The reason is that I would like to show a specific error message with the
> full exception on the screen only with debug mode.
>
> Thank you,
> Hugo.
>
>