Debugging RubyMotion
Upcoming SlideShare
Loading in...5
×
 

Debugging RubyMotion

on

  • 855 views

Slides from the presentation on "Debugging RubyMotion" given at the RubyMotion #inspect 2013 conference.

Slides from the presentation on "Debugging RubyMotion" given at the RubyMotion #inspect 2013 conference.

Statistics

Views

Total Views
855
Views on SlideShare
855
Embed Views
0

Actions

Likes
2
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Debugging RubyMotion Debugging RubyMotion Presentation Transcript

  • How to DebugRubyMotion AppsThe Life and Times of an Object
  • My App Crashed!Now what???
  • Weapon of Choicegdb• rake debug=1• Watch it crash• Play!
  • What is an Object?• Just a struct!• First value is the isa pointer to the Class• In gdb, try “x”• Refer to the Obj-C Runtime Reference
  • Demo
  • Advanced WeaponryMallocStackLoggingNoCompact• man malloc• Set environment variables to log the stackduring allocations• Run in GDB, use malloc_history to viewstacks
  • Demo
  • 4 Rs of Bug Reporting• Reproduce• Report• Reduce• Regress
  • Reproduce It!• Can you make the bug occur every time?most of the time? some of the time?• Check all config files, Rakefile• Environment and EnvironmentVariables• Ask a friend
  • Report It!• motion support• All steps to reproduce• bonus points for small sample apps• RubyMotionVersion (Have you updatedrecently?)• Crash log (hint: look in Console.app)
  • Reduce It!• Eliminate libraries• Simple scripts are best• Shrink code as much as possible!
  • Regress It!• Did it used to work?• motion update [--force-version=X]
  • Demo
  • Questions?@manhattanmetricJoshua Ballancohttps://github.com/jballanchttp://www.burnsidedigital.com