Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Getting the Most from Xamarin Studio - Michael Hutchinson


Published on

Published in: Technology

Getting the Most from Xamarin Studio - Michael Hutchinson

  1. 1. Getting the Most fromXamarin StudioMichael HutchinsonSoftware
  2. 2. Customizingthe Workspace
  3. 3. Your WorkspaceDocumentSolution PadGlobal SearchConfiguration/TargetSelectors Notification AreaAuto-hiddenPads
  4. 4. Key Bindings•  Do common things more quickly•  See them in menus and global search•  Find them and rebind them in Preferences•  Preferencesè Generalè Key Bindings•  Access many hidden commands!
  5. 5. Editor Behavior•  Preferencesè Text Editor•  Enable code folding, auto-formatter•  Enable markers and visual guides•  Change word breaking mode•  Even vi emulation!
  6. 6. Build Behavior•  Preferences è Projects è Build•  Jump to errors, warnings, or neither•  Message bubbles or error pad•  Save files before build, ask or ignore•  Whether to build before running
  7. 7. Policies•  Solution-specific style settings: formatting, namingconventions, file header, etc.•  Edit in Solution Options•  User Preferences only apply to new solutions•  Manage policies in Custom Policies dialog
  8. 8. DEMO
  9. 9. Getting AroundQuickly
  10. 10. Global Search•  Activate with ⌘. on Mac, Ctrl-, on Windows•  Navigate to files, types, members, commands•  Smart camelCase search•  Type filter prefixes – file:, class:, command:•  Location suffix – :line,column
  11. 11. Find and Replace•  Inline search– click magnifying glass for options•  Find in Files – search/replace in project/solutionCmd-Shift-F (Mac), Ctrl-Shift-F (Windows)•  Pin search output pads to keep results –next search will use new pad
  12. 12. Navigation•  Go To Declaration – go directly to type, local, memberCmd-D (Mac), F12 (Windows)•  Find References – find all places anything is usedCmd-Shift-R (Mac), Shift-F12 (Windows)•  Navigate back to where you wereCtrl-Cmd-Left (Mac), Ctrl-Alt-Left (Windows)
  13. 13. DEMO
  14. 14. EfficientEditing
  15. 15. Code Completion•  Use camelCase to search•  Import type, add the using automatically:Ctrl-Alt-Space•  Toggle suggestion mode, explicit commit:Ctrl-Shift-Space
  16. 16. Hidden Editor Commands•  Expand selection: Alt-Shift-Up•  Move line up/down: Alt-Up/Down•  Block selection – edit many columns at onceAlt (Mac), Ctrl (Windows) and mouse drag
  17. 17. Context Actions•  Contextual code transformations•  Over 70 available, see Preferences èSource Code è C# è Context Actions•  Access via context menu è Refactor•  From keyboard, Alt-Enter
  18. 18. Source Analysis•  Analyses source code on the fly•  Warns of potential errors and style violations•  Offers automatic fixes as context actions•  Hints when context actions available•  Customizable severity of rules•  Preferences è Text Editor è Source AnalysisExperimental
  19. 19. DEMO
  20. 20. AdvancedDebugging
  21. 21. Debugger Options•  Preferences è Projects è Debugger•  Enable stepping into framework code•  Speed up debugging by disabling automaticToString() and property evaluation
  22. 22. Advanced Breakpoints•  Tracepoints – print expression and resume•  Conditional breakpoints – automatically resumeunless expression evaluates to true•  Run è New [Function] Breakpoint…•  Context menu è Breakpoint Properties
  23. 23. Watches•  Watch any expression, not just variables•  Turn hover inspection into pinned watch oneditor surface by clicking pin icon•  Watches/locals turn blue when value changes
  24. 24. DEMO
  25. 25. Adding Featureswith Add-ins
  26. 26. Creating Add-ins•  Whole IDE built on add-in model, extremely extensible•  Commands, templates, build, syntax schemes, contextactions, pads, editors, analysis rules, project types…•  Most of the IDE is open-source (MonoDevelop)•  Publish at, install fromAdd-in Manager
  27. 27. DEMO
  28. 28. Resources•  My blog•  Xamarin Studio Forums•  Stack Overflow•  MonoDevelop Developer Resources
  29. 29. Q&A
  30. 30. THANK YOU
  31. 31. Navigation CommandsCommand Mac WindowsGo to Definition Cmd-D F12Find References Cmd-Shift-R Shift-F12Navigate Forward/Back Ctrl-Cmd-Left/Right Ctrl-Alt-Left/RightNext/Previous Result Cmd-Opt-Up/Down F4 / Shift-F4Find in Files Cmd-Shift-F Ctrl-Shift-FFind Cmd-F Ctrl-FNext/Previous Usage Cmd-Shift-Up/Down Ctrl-Shift-Up/Down
  32. 32. Hidden Editor CommandsCommand Mac WindowsExpand selection Alt-Shift-UpInsert line below Shift-EnterDynamic abbrev Ctrl-/ Alt-/Delete to end of line Ctrl-KMove line up/down Alt-Up/DownSubword motion Ctrl-Left/Right Alt-Left/RightBlock selection Alt-Mouse-Drag Ctrl-Mouse-Drag
  33. 33. Debugger CommandsCommand Mac WindowsStart/Resume Cmd-Enter F5Pause Cmd-Opt-P Ctrl-BreakToggle Breakpoint Cmd- F9Step Over Cmd-Shift-O F10Step Into Cmd-Shift-I F11Step Out Cmd-Shift-U Shift-F11
  34. 34. THANK YOU
  35. 35. Code Generation Window•  Contextual generation of members/statements•  Depends on context•  Edit è Show Code Generation Window•  Alt-Insert on Windows
  36. 36. Catchpoints•  Pause at the point an exception is thrown, evenif it’s handled•  Run è Exceptions, add exception types to the list•  Breaks on all subtypes
  37. 37. Code Templates•  Code snippets with smart linked regions•  Edit è Insert Template/Surround With...•  Or type short name, Tab twice•  Create and edit in Preferences èText Editor è Code Templates
  38. 38. Inspect Threads and Stack Frames•  Double-click thread in threads pad to show stack•  Double-click stack frame to show location•  External code frames show in italic•  Editor highlights current stack frame in yellowand other frames in green