Flex Debugger

Flex Builder 3 has a brilliant debugger and I would like to
debug my Flash code in it. The Flash debugger is not as good. How
can I develop my applications in Flash and debug them in
Flex?

Okay, figured out a solution to this fdb issue:
Swishsoft, with their useless swf optimizer, make 3
significant changes to your computer's registry, indicating that
their useless swf optimizer is the default JAR Launcher, creating
conflicts with fdb's attempts to launch your debug swf file.
I deleted all 3 entries in the registry (2 of them reverted
back to their default state), and now fdb works as it was designed
to. Problem solved :)
NOTE: Modifying your computer's registry could render your
computer kaput. Tinker carefully ;)

Similar Messages

  • FLEX debugger not hitting breakpoints, because Flash sometimes embeds source file paths with wrong letter case?

    I was trying to figure out why breakpoints were working fine for source files in some locations but not others.  FlashDevelop's debugger (which I believe is actually the FLEXSDK debugger) was successfully connecting, tracing output, and hitting breakpoints in SOME files, but not others.
    I downloaded SWFInvestigator from Adobe Labs and checked the embedded debug paths for various source files to see what was going on.
    I discovered that files in which no breakpoints could be hit had their paths embedded in all lowercase (e.g. "c:\users\username\desktop\source\myproject" instead of "C:\Users\username\Desktop\source\MyProject").
    So I have two questions:
    First, is this a Flex debugger issue, or a FlashDevelop plugin issue? Letter case shouldn't matter or interfere with matching file paths in Windows.
    Second, what could possibly influence the letter case of embedded paths in a SWF output by Flash Professional (CS6), such that they are sometimes all lowercase and other times maintain the same case from the file system?  And why would that affect a debuggers ability to hit breakpoints in Windows 7?  I am compiling in multiple ways. Sometimes clicking Publish within Flash. Sometimes the file being published is not even open in Flash, and my JSFL script file is passed to Flash.exe containing embedded file paths to open the document. Usually, everything seems to work fine, no matter where I publish from, regardless of whether the FLA file is open or not. I'm honestly starting to believe that it depends on how the FLA was last opened in Flash Professional, as though it saves some sort of last access path internally and uses that to embed debug information.

    I don't think it's the source path in my case, because it's simply the dot ".", although I did check that because it would most likely influence the embedded paths.
    In the library path, I use relative paths exclusively, since all my individual project folders exist in the same "source" folder.
    Here's how I arrived at the conclusion that something more complex or "stateful" must be occuring:
    I publish my files with a one-click application, which does the following
    updates version timestamps (static constants) in specific files via regex match
    fills in a JSFL template with the FLA filename and writes the JSFL file to disk, then passes the JSFL file path to flash.exe for publication
    the JSFL then runs a command, which signals the main application via cross-process communication that the script has finished publishing
    That all makes it easy for me to update and publish multiple projects and deploy them, with a single click.  Here is the JSFL template I created, which has been drastically simplified since the days where it used to search to see if the file was open in Flash, select the document, and call publish.  Now it just uses the publishDocument method to silently publish files without opening them.
    var filepath = "FLAFILEPATH"; //template parameter: the URI (beginning with "file:///") of the FLA file to publish
    fl.publishDocument( filepath, "PUBLISHPROFILENAME" );
    FLfile.runCommandLine("COMPLETECOMMAND");
    The C# app replaces the strings in all caps with the actual values.  The COMPLETECOMMAND is actually populated with the application's own executable path, along with a "complete" switch, which lauches a 2nd instance, which handles the complete switch by broadcasting a signal over an interprocess channel and then terminates.  The main instance captures the signal, triggers a wait handle, and continues with publishing the next file.  Here is the core code for it:
    private string fillTemplate( string fla_directory, string fla_filename, string publish_profile_name )
        string fileuri = "file:///" + Path.Combine( fla_directory, fla_filename ).Replace( '\\','/' );
        return EmbeddedResources.OpenAndPublish //JSFL template file embedded as string resource
            .Replace( "FLAFILEPATH", HttpUtility.JavaScriptStringEncode( fileuri ) )
            .Replace("COMPLETECOMMAND", HttpUtility.JavaScriptStringEncode( "\"" + Application.ExecutablePath + "\"" + " -publishcomplete" )) //call self with -publishcomplete switch to signal main instance's publishCompleteSignal
            .Replace("PUBLISHPROFILENAME", HttpUtility.JavaScriptStringEncode( publish_profile_name ) );
    private static readonly string FLASH_PATH = @"C:\Program Files (x86)\Adobe\Adobe Flash CS6\Flash.exe";
    public void publish( string fla_directory, string fla_filename, string publish_profile_name )
        Program.publishCompleteSignal.Reset();
        string template = fillTemplate( fla_directory, fla_filename, publish_profile_name );
        string curdir = Environment.CurrentDirectory;
        string tempJSFLfilepath = Path.Combine( curdir, "temp_script.jsfl" );
        File.WriteAllText( tempJSFLfilepath, template );
        Process p = Process.Start( FLASH_PATH, tempJSFLfilepath );
        Program.publishCompleteSignal.WaitOne( 30000 ); //timeout after 30 seconds
    Here's where it gets interesting.  The FLAFILEPATH has ALWAYS been passed in as all lower case, yet this publication method has worked 99% of the time for hundreds of publish operations every day.  This applies to both the publication of the first SWC, which is referenced by the second published SWF (both were being published with lowercase paths), yet the paths for the main SWF were remaining in lowercase, while those in the referenced SWC were maintaining the correct case from the file system.
    So there may be any number of things going on here.  SWCs may be published differently than SWFs, such that SWCs always have the correct letter case for debug source files, regardless of how the source FLA project was opened.  Ensuring the path passed to publishDocument uses the right case definitely fixes the problem, but it doesn't explain why it usually worked, despite having always been passing a lowercase string.  The only variable I can think of in all of this is Windows itself or Flash, such as whether the document was open in Flash at the time the silent JSLF publishDocument command ran, and how that FLA was last opened (via shortcut, via "recent documents" in Flash, via recent documents in Windows.  It has to be something, even if it's something as obscure as how the folder path was last accessed in windows, although I strongly suspect it's just how (in terms of path case) the FLA was last opened in Flash.
    In any case, I'm happy that passing the right case to JSLF's publishDocument command fixes the problem, so I'm not going to spend any more time trying to figure out how opening the FLA in various ways could affect the embedded debug paths.  The only thing that should be done is to address how paths with the wrong case are handled when they do get embedded that way for whatever reason.  Perhaps the flex debugger should be updated to use case-insensitive matches in case-insensitive file systems, unless, perhaps, this is a FlashDevelop debugger issue after all.

  • Flex debugger problem?

    Guys.. i have some problem with flex debugger...
    well...
    i´m trying to debug my application.. bug something doesnt seens right...
    on flex build 3... i´m chossing to debug my main aplication...
    everything goes well... my application runs on INTERNET EXPLORER.. so i go to the flex builder ... and click on FLEX DEBUGGING...
    in the DEBUG PANNEL.. appers to me that i´m connected...
    but.. in the variables... breakpoints and expressions.. nothing appears!
    see the image:
    someone can help me?
    cya

    The debugging view allows you to set breakpoints, watch variables, etc.
    You need to set the breakpoints in functions where you want the code to stop.
    And watch variables may have no value unless you are currently stopped by a breakpoint, and they may have no value if the variable has no valid value at that point in the code, as variables go in and out of existance and scope.
    If this post answers your question of helps, please mark it as such.

  • Launching the Flex debugger from ant

    I use an ant target like this:
                    <target name="launch">
                                    <echo>LAUNCH</echo>
                                                    <exec executable="${FLASHPLAYER_EXE}" errorproperty="trace.output">
                                                    <arg line="'${DEPLOY_DIR}\SellersApp.swf'" />
                                    </exec>
                    </target>
    to launch a swf in the debug flash player.
    I would like to launch the Flex debugger and make use of break points etc.  I tried replacing FLASHPLAYER_EXE with the path to Flex, but that tried to launch a new instance of Flex.  I looked at the Ant manual but could not work out how to address the running instance of Flex that launched Ant.
    I have been using the Builder configuration method used here:
    http://www.rozengain.com/blog/2008/04/24/flex-builder-ant-build-debug-console-output/
    But then I run into problems when I just try and run an Ant target independently - it insists on proceeding with the whole launch operation first.
    I posted a variation on the question here: http://forums.adobe.com/thread/578171 but I think I named it poorly and put it in the wrong forum - so apologies for cross posting.

    Unless Eclipse's debug/launch infrastructure is exposed to ant, I'm not sure how this is possible.
    However, using the command line debugger - fdb - should be possible from ant.
    Another developer has been trying to get this to work. You need to pass -unit to fdb and create a file called .fdbinit that has debugger commands in it.
    -Anirudh

  • Flex Debugger Error (fdb)

    Hi All,
    I've been trying to run the flex3 SDK command line debugger
    with no success (a frozen cmd prompt on one attempt). I'm running
    this by double-clicking on the fdb file, and typing '
    RUN
    path to my debug swf'.
    The error message it's returning makes little sense to me:
    Cannot run program "C:\swishsoft\Swift Optimizer\swiftplayer.exe
    %1": CreateProcess error=3, The system cannot find the path
    specified'
    A while back I installed Swift Optimizer on my system, but
    deleted it quickly as, frankly, it sucks big time. Just seems
    strange that the Flex debugger has mentioned this file (unless
    Swift Optimizer has changed something, somewhere that fdb is
    reading?).
    Can anybody shed any light on this oddity, or - more likely -
    what I'm doing wrong?
    Thanks!!

    Okay, figured out a solution to this fdb issue:
    Swishsoft, with their useless swf optimizer, make 3
    significant changes to your computer's registry, indicating that
    their useless swf optimizer is the default JAR Launcher, creating
    conflicts with fdb's attempts to launch your debug swf file.
    I deleted all 3 entries in the registry (2 of them reverted
    back to their default state), and now fdb works as it was designed
    to. Problem solved :)
    NOTE: Modifying your computer's registry could render your
    computer kaput. Tinker carefully ;)

  • Flex Debugger - watching an expression continuously

    Hi all,
    Just a quick question about the Flex debugger (version 3).
    I have an AS class and I want to monitor a value continuously as the movie is playing. For instance, I might want to watch 'somebutton.x' or 'somebutton.width' - I don't want to use breakpoints because obviuosly every breakpoint stops the animation, and these values change on a window resize - so more or less every frame.
    How do I add a watch expression without putting in a breakpoint - the one's I've put in so far remain blank unless I add a breakpoint!
    Many thanks
    Kevin

    you could always trace() the value instead.

  • Can i port the flex debugger  to c++ and use it in my application

    Hello
    i like to build graphical as/flex debugger based on the open source flex , my native language is not English
    so from reading the license documents im not sure if i allowed or
    not to port/learn how to the flex debugger to c++ and use it as base to my application .
    thanks for the help.

    I heard from friends the best phone reception in India is Nokia or Sony...because the call centres for both companies have call centres in India and they said the best receptions from cellphones/networks is via Nokia or Sony.
    I fully support Apple I have many products but if you spend so much money on an iPhone 4S that didn't work out; why not spend time goggling India's network provider/carrier and do some research?!?
    Or email Apple support with all your questions, details, informations and maybe thay can help you out more.  It was me, the best answer is to Spend the time on research before making a purchase.
    Good luck.

  • Flex Debugger Error

    I'm getting the following ActionScript error when clicking a
    button that triggers a handler function, but only in debug mode.
    Running the application without the debugger works fine, with
    no Actionscript error.
    ActionScript Error
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at portal.access::userForm/::updateUser()
    at portal.access::userForm/::saveHandler()
    at portal.access::userForm/__saveBtn_click()
    I can't seem to set a breakpoint before the error occurs when
    pressing the button.

    hi,
       you will need to insstall flash player 10 debug version.You are facing
    this problem because current version of flash player installed on your
    system is not The Debug version . If you have the debug version then you
    browser cant find it .so solution will be to install flash player for both
    IE and firefox and check which one of them has debug version working.
    http://www.adobe.com/support/flashplayer/downloads.html
    download the debug version according to your requirement . this page
    contains both debug versions for netscape and IE so should install both of
    them if in case you need to switch for testing to different browser.Altough
    your problem can also be solved by selecting  different default browser from
    flex builder in which debug version is installed and working.

  • Flex debugger issue

    When I run flex application it keeps showing popup window
    saying
    “Where is the debugger or host application
    running?”
    choose between : localhost or IP?
    is anybody know how to avoid this?
    Thanks!
    Jamil

    Can it be that your running the debug version of your
    compiled flex appliaction (SWF file) ?
    If I start the debug version outside Flexbuilder I got the
    same question.
    If I use the normal version no question is asked.
    regards,
    kcell

  • Flex debugger can't connect to player

    in flex, I click the debug button, after which firefox opens
    up with my movie. flex's debug progress bar times out after two
    minutes once it fails to connect to the player. I have flash
    version 9, and I know it's the debug version because I can
    right-click on a movie and I see the "debug" option. If I use the
    standalone debug player, it sends output to the console, but even
    when its running and flex is looking for a player to connect to it,
    it doesn't do anything.
    i'm running ubuntu 7.10 (linux)
    thanks

    I've had the same issue where it mysteriously couldnt
    connect. I just installed the Flash debug player again (windows
    though) and it restart FB, worked for me.

  • Flex Builder, debugger and web application: how?

    Hello,
    I'm traying to setup a project in eclipse with both a java
    web application (servlets, jsp) and flex applications as a
    frontend. So I installed flex builder as a plugin on an eclipse+web
    standard tools, then created a WST web application project, and
    used the "Add flex nature.." of the flex plugin. I don't want to
    use the flex data services.
    Now, in a standard run (I installed a tomcat 5.5 and
    configured it in eclipse), my mxlm files are being correctly
    compiled into swf, and they are successfully calling my servlets
    (which simulates a backend xml-based interface).
    I'm having problems in debug: if I launch the debug profile
    related to tomcat, the normal version of the sfw will be used (even
    manually switching to the "-debug" version, it says that a running
    flex debugger has not be found on localhost). On the other way, if
    I launch the debug as a "flex application", it seems to work (it
    stops at breakpoints) but my tomcat is not started at all, the swf
    is accessed as a local file and all call to my servlet will fail..
    so it will stop working almost immediately.
    There is a way to setup eclipse to start standard java
    debugging with tomcat *and* the flex debugger?
    Thanks
    Cosma

    I found a workaround of sorts for the problem: don't
    terminate the applications!
    Previously, I would terminate the application using either
    the Terminate button in the Debug view or by closing the tab in the
    browser (Firefox). Now I just let them pile up in the browser and I
    rarely see this problem.
    In other words, I was having lots of trouble when doing
    Launch-Terminate-Launch-Terminate... but now I just
    Launch-Launch-Launch... and clean up once in a while.

  • Flash player cannot connect to debugger

    Hi,
    for a few months the flex debugger has worked fine, now the
    other day, suddenly, the flash player can't connect anymore to the
    debugger.
    I downloaded the latest version of the debugger again,
    installed it, rebooted, but still the same problem.
    I've not made any changes to the -debug.html reference.
    Anyone an idea ?
    grtz,
    B

    UPDATE #2:
    I figured out MY problem...
    I edited the html-template file index.template.html and the
    debugger needs the default code to work correctly.
    I changed it to use ufo.js to insert the flash content
    instead of the default AC_OETags.js file, which I guess is required
    to make the debugger work.
    I'm not sure about the exact differences in these two
    approaches, but I'm sure it's nothing that couldn't be fixed with a
    little effort and some javascript knowledge.
    The one thing that is kinda bad, is that if Flex Builder
    can't connect to the flex app, it just sits there and does nothing
    - and you can't build the app again until it times out, or you
    close FB, whichever comes first. I think that either the timeout
    should be shorter, or you should be able to cancel it
    somehow.

  • How does the player talk to the debugger

    Is there some way to interact with the player through the
    debugging connection instead of the Flex Debugger? (A possible
    application could be automation, code coverage, etc.)

    Both Lee Jay and Beat are correct.
    When downloading profiles with ALPD, the thing to avoid is downloading a profile made with a camera that has a smaller sensor than yours. 
    For example: Suppose you have a Nikon D700 (full frame sensor). You don't want to download profiles made with a Nikon D90 (1.5x crop) and use those with the D700.

  • Connection to the Debugger or Profiler could not be established

    I think I have a Flex/Flash Builder beta config issue? Would be very grateful for any advice.
    This might be a good clue to source of my problem:  If I run Flash CS4 Professional and "Begin Remote Debug Session" the flash player will connect to the CS4 debugger - and this is running the same project file in either IE8 or Firefox 3. But it will not connect with the Flex debugger.
    I'm in Windows XP and just trying to learn Flex with the "learn in a week" exercises but spent about a fuggin day trying to fix the debugger issue. I've done everything that the forums advise: checked localhost is 127.0.0.1, checked the mm.cfg, reinstalled everything browsers, flash debug versions.. but still can't get the damn debugger in Flex or now Flash Builder beta to work.
    Somebody please help!
    Robert

    In the case of Flash Professional, a connection is established between the Flash Player Debug version and the Flash Professional Debugger while running the swf (whether local or published on a web server). You right click on the Flash area in the browser and select remote debug.
    In the case of Flex, a connection is established between the local swf that has just been built in debug mode (in bin-debug) and the Flex Builder Debugger (or Profiler).
    If you want to run the Flex Debugger or the Flex Profiler, launch the application from Flex Builder in Debug mode or in Profiler mode respectively. Do not try to publish your swf on a web server, right click and select remote debug as you do in Flash Professional. It won't work.
    I have also found I coult only make the Profiler work in IE, not in Firefox.

  • Debug flex app loaded from remote server

    Hi,
    I'm developing a flex app which gets loaded from a remote
    server and it connects using amf to that server and gets some data.
    Now, I can't test from within the flex builder ide, as the URL will
    be empty. When I test using IE/Firefox pointing to the remote
    server URL where this debug.html is mounted, the swf asks for a
    host ip/name where a flash/flex debugger runs. When I give
    localhost/127.0.0.1, it fails and displays the dialog box again. Is
    there a way to connect the swf from remote server to connect to a
    debug console inside the FB2 ide?

    Well, I ran all commands shipped with FB2and found out that
    fdb does connect and allows to "continue". Still the in IDE
    developing experience and quick turn around isn't there. Is there a
    way to get the URL from which the swf was loaded from within the
    swf, so that if its a remote server, I can get data from it, else
    its in debug state, so I can get data from some hard coded
    host.

Maybe you are looking for