2 Replies Latest reply on Jun 5, 2009 2:06 PM by cksachdev

    Source Attachment Settings in Flash Builder

    cksachdev Level 1

      Hello everyone,

      I am facing an issue with debugging. I don't want to step through the framework code in the debug mode. To avoid that, I removed the Source attachments, by selecting that node in the tree and clicking on remove. But it doesn't save the change settings. When I debug after saving these settings, it jumps to framework classes e.g. UIComponent etc. After looking at it again, I can again see the Source attachments. I tried looking at the entire checked out source, but not able to find out, how this Source attachment setting is working in Flash Builder. I don't want to jump through framework classes. Is it possible to do this ?


      Note: After the experiments above, I removed the Flex SDK and then copied all the swc classes and put them in a separate folder, still Flash Builder is able to find out the source attachment. Any light on how it works

        source_attachment_settings.jpg

       

      Thank you

       

      --

      Chetan Sachdev

        • 1. Re: Source Attachment Settings in Flash Builder
          mike_morearty Level 1

          Hi Chetan, a couple of points.  First of all, it is true that you cannot remove the default source attachments.  You can change them, but if you try to remove them, Flash Builder says, "Oh look, a swc with no source attachment, but this swc is part of the Flex SDK, so I know where the source is," and fills it in again.  We considered a more elaborate architecture which would be able to distinguish between "no source attachment" vs. "use the default source attachment," and decided that any benefit was quite small and was not worth the effort.

           

          Which brings me to what you are trying to do.  Even if you had the ability to remove the source attachment, that would NOT achieve your goal of avoiding stepping into Flex framework code.  The presence of a source attachment is not what controls whether the debugger steps in.

           

          When any Flex code (including the Flex SDK itself) is compiled with debugging information turned on, special debug opcodes are inserted into the swc itself marking the transitions between source files, the transitions from one line of source to the next, and things like that.  That is the information the debugger uses to decide whether to step into a given function: If that function has debug information embedded within it, then the debugger will step into it, and if it doesn't, the debugger won't.  Then, AFTER you reach the next line of code, Flash Builder looks at the source attachment to find the corresponding source file and display it.

           

          So if you were able to remove the source attachment, the only behavior change you would see is that you would still step into framework code, but when you got there, instead of seeing a text editor with the source code of, say, Button.as, you would see a "source not found" message in the text editor.  That's not what you are trying to do.

           

          There is currently no way I can think of to do what you are requesting.  Eclipse's JDT (java dev environment) has a feature for this, they call it "Step filters."  It would be great if you logged an enhancement request at http://bugs.adobe.com/flex .

           

          - Mike Morearty

          Flash Builder team

          1 person found this helpful
          • 2. Re: Source Attachment Settings in Flash Builder
            cksachdev Level 1

            Thank you Mike for your nice explanation. I have logged an enhancement request.

            https://bugs.adobe.com/jira/browse/FB-20303

            Community members please vote for it

             

            Thank you

             

            --

            Chetan Sachdev

            http://cksachdev.blogspot.com