Linking source code to a SWC in FlexBuilder

So everyone is telling me I should post more… so I thought I would share this little pearl.

When adding a SWC to your project you can also add the ability to step in when debugging or F3 (or ctrl+click) into the class definitions contained in the SWC file by adding the directory where the source code lives to the SWC’s source attachment property. This also gives you the ability to step into the source code.

Here’s a screen-shot example of linking the Cairngorm 2.1 source with the Cairngorm.swc.

SourceAttachmentCairngormScreenShot

OK… no more excuses… love the swc…  embrace the swc.. they’re apart of flex too.

6 Responses to “Linking source code to a SWC in FlexBuilder”

  1. JabbyPanda Says:

    Thanks for sharing this nice hint, this will help old productivity while editing our SWC libraries

  2. ivan Says:

    Nice Job Clint, it was far away the last post, but this one its very cool!!

    Thanks for the tip, Ivan from Mexico!

  3. ronzoni Says:

    Wait, why would I even need a swc if someone has the source code??

    I want to distribute just a swc, and have the user browse the source code from that. Is that not possible?

  4. Clint Modien Says:

    Hey Ron…

    swcs are important for compile times and reusing code across multiple applications… linking source code to them makes it easier to browse them to see how they work…

    For example… linking the cairngorm source to the cairngorm swc…

  5. d0e008254c25 Says:

    d0e008254c25…

    d0e008254c251bdd6f25…

  6. Zelda Says:

    Keep up the good work.

Leave a Reply