3 Replies Latest reply on Feb 17, 2010 9:28 PM by Flex harUI

    Debugging options for a "child" application

    M. Ridcully

      I have a Flex application, which opens another one (in another browser window). How can I debug that other application?

       

      If I set breakpoints in Flex Builder, only those in the "startup" application are hit. Unfortunately, I cannot create a separate debug configuration to launch that "child" application directly - the URL is generated dynamically and uses some transient parameters (like session ID, etc).

       

      Is there any Flex equivalent of "int 3" or DebugBreak(), which I could temporarily add to my code and then attach debugger later, when it is hit?

       

      Any other debugging options?

        • 1. Re: Debugging options for a "child" application
          Flex harUI Adobe Employee

          An "application" that is a set of applications should be designed in a way

          that each individual application can be independently tested.  You could:

           

          1) Design the child such that the child can be launched first and will wait

          for communication from the startup app

          2) Launch the child app via NavigateToURL and put all communications on the

          url so you can just put the url params in the run/debug settings for the

          child

          3) Make sure there is a way to delay the launch of the child app.  That way

          you can "run" the startup app, then tell the debugger you are going to debug

          an external app before launching the child.

           

          I have used (3), but I use the command line debugger (fdb) to do it.

          1 person found this helpful
          • 2. Re: Debugging options for a "child" application
            M. Ridcully Level 1

            Thank you!

             

            Option 1 isn't really an option in my case.

            Option 2 - that's how it currently works. The problem is, some of these parameters are different every time.

            Option 3 - I cannot say I fully understand what exactly you mean by "tell the debugger you are going to debug an external app", but I'll try to read some documentation on fdb tommorrow, so thank you for this hint!

            • 3. Re: Debugging options for a "child" application
              Flex harUI Adobe Employee

              I thought there was a way to debug external just like you can profile

              external.  I can't find it.

               

              There is also:

              4) Export the first app as a release build and run it.  Then it won't try

              for the debugger and the child should be the first to connect to the

              debugger.