Re: How do I debug actionscript in ming?

Douglas Bagnall <[email protected]> Tue, 30 Dec 2003 11:47:51 +1300
Newsgroups gmane.comp.web.ming.general
Message-ID <[email protected]>
As an extension to Wolfgang's method, I like to make debugging output
conditional on the server url or port. This means you can use exactly
the same code in development and production.


DEBUG = (_url == testServer); //or similar

if(DEBUG){
    createTextField('log');//etc
}

function mytrace(x){
    if (DEBUG){
       log += x + '\n';
       log.scroll = log.maxscroll;
    }
}


> function mytrace(x)
> { log += x + '\n';
>   log.scroll = log.maxscroll;
> }


douglas