2 May 2011
Familiarity with Flash Builder 4.x
I’ve been collecting a summary of Flash Builder 4.x tips I find useful to help me be more productive as a developer and thought I would share them here. I’m including the shortcut for the feature where possible (based on Mac OS, for Windows use Ctrl in place of Cmd). Please feel free to comment on other features or tips you find useful that I may not have covered!
Many developers are unaware of all of the shortcuts currently available in Flash Builder 4 IDE or perhaps don’t take the time to try to remember them, however knowing and using these shortcuts can dramatically improve developer efficiency and productivity and decrease overall development time. The following is a list of features and shortcuts I find particularly useful. They are listed in a manner that can be used as a quick reference guide or printed for daily use.
Important Note: Those items marked with ** are only available in the Flash Builder 4.5 IDE.
Notice that you can generate a copy of the default Spark skin and then modify as needed which speeds up the process greatly. Also note the Remove ActionScript styling code checkbox. If you don’t need to set any exclusions for styling then you should check this box.
The following tips are useful to know and remember while in a debugging session. Some of them are actually new in Flash Builder 4 and definitely worth knowing.
Conditional breakpoints—You can now set a condition on a breakpoint that will cause it to only fire a certain number of times, or based on a certain expression or boolean (for instance it will only halt at that breakpoint when a given variable is a certain value). To set a conditional breakpoint, first set a breakpoint on a line (Shift-Cmd-B), then right-click and select Breakpoint Properties. You can set multiple expressions and just separate them with a comma or even modify a line of code from here without recompiling. Watch this Adobe TV video for some interesting things you can do with this feature.
Watchpoints—New to Flash Builder 4, it allows you to monitor a variable instance during a debugging session. To use a watchpoint you need to set a breakpoint and when it stops at the breakpoint, go to the variables view and right click on the variable instance to toggle a watchpoint. You can find more information about how to debug with watchpoints in this article.
Expressions—You can actually drag any expression into this dialog box directly from your code to quickly monitor that expression. Note that if you are in the editor dialog box for the Expression you can type Shift-Enter to close it quickly rather than go to a newline.
Run to Line—Cmd-R—While in a debug session and stopped at a breakpoint, you can choose a line further in the code to run to by going to it and doing Cmd-R or right-click and find Run to Line in the context menu to continue to run to that specific line of code.
Network Monitoring—New to Flash Builder 4 it allows you to inspect and monitor network traffic from your Flex/AIR applications that use HTTPService, WebService, RemoteObject, URLRequest, etc. It can be used to examine XML, AMF, and JSON data sent using SOAP, AMF, HTTP, and HTTPS protocols. Note: this feature requires Flash Builder Premium and does not work with SSL or Data Management services provided by LiveCycle Data Services.
I realize that I’ve mentioned a lot of key mappings here that may be hard to remember at first, but fortunately there’s a key mapping to show the current list of key bindings quickly that you can refer to anytime in your source using Cmd-Shift-L!
Also, to find out even more tips and tricks you can do with Flash Builder 4, check out this Adobe TV video by Scott Evans from the Flash Builder team. Also read the Adobe Developer Connection article Developer productivity improvements in Flash Builder 4 by Jason San Jose. He also shares tips on his blog.