1 person found this helpful
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