There is no way to tell if a debugger is connected, but I've been
meaning to experiment with a "protocol" where you could set a breakpoint
early in your app and when the debugger hits that breakpoint, in the
introspection of properties of the current object, indirectly sets a
flag that your app can use.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Morearty
Sent: Tuesday, October 30, 2007 1:46 PM
To: [email protected]
Subject: [flexcoders] Re: Determine in AS if debugger is running

 

To determine which SWF version is running, use this code from another
Flex team member:
http://blogs.adobe.com/aharui/2007/10/debugging_tricks.html
<http://blogs.adobe.com/aharui/2007/10/debugging_tricks.html> 

There are actually three different debugger-related things a person
might want to know:

- To determine if the Flash player is a debugger-enabled one, use
Capabilities.isDebugger, as Matt wrote.

- To determine if the SWF that is running was compiled with debugging
info, use Alex's code at the above link.

- There is no way to tell if a debugger is actually connected.

- Mike Morearty, Adobe Flex Builder team

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "mthomas1969" <[EMAIL PROTECTED]> wrote:
>
> Matt-
> 
> Thanks--that's a step in the right direction, but I need to know if 
> the project is actually being debugged. Your code tells if the Flash 
> debugging player is running, but not whether the SWF was launched 
> from a debugger. 
> 
> To be more specific, can I tell if the bin-release SWF version is 
> running vs. the bin SWF version containing the debug information?
> 
> -Matt Thomas
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Matt Horn" <mhorn@> wrote:
> >
> > <mx:Script><![CDATA[
> > import flash.system.Capabilities;
> > 
> > private function reportVersion():String {
> > if (Capabilities.isDebugger) {
> > return "Debugger version of Flash Player";
> > } else {
> > return "Flash Player";
> > }
> > }
> > private function reportType():String {
> > return Capabilities.playerType + " (" + 
> Capabilities.version
> > + ")";
> > }
> > ]]></mx:Script>
> > 
> > <mx:Label text="{reportVersion()}"/>
> > <mx:Label text="{reportType()}"/>
> > 
> > hth,
> > matt horn
> > flex docs
> > 
> > > -----Original Message-----
> > > From: [email protected]
<mailto:flexcoders%40yahoogroups.com>  
> > > [mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com> ] On Behalf Of mthomas1969
> > > Sent: Tuesday, October 30, 2007 4:22 PM
> > > To: [email protected]
<mailto:flexcoders%40yahoogroups.com> 
> > > Subject: [flexcoders] Determine in AS if debugger is running
> > > 
> > > Is there a way to determine in AS if the SWF is running in 
> > > the debugger?
> > > 
> > >
> >
>

 

Reply via email to