Quantcast
Channel: Debugging – Michael Tsai
Browsing all 159 articles
Browse latest View live

Zombies and ARC

Apple QA1758: Prior to iOS 6 / OS X 10.8, using the the Zombies instrument or NSZombieEnabled or the "Enable Zombie Objects" Xcode diagnostic, prevented ARC from “cleaning up” instance variables at...

View Article



Block Debugging

Damien DeVille: We are mostly interested about the first method argument (the third argument of the objc_msgSend function) which happens to be a stack block. Now, obviously we know exactly what the...

View Article

sysdiagnose

Cocoanetics writes about the underpublicized sysdiagnose tool and associated Command-Shift-Option-Control-Period keyboard shortcut (via Peter Hosey).

View Article

Application Specific Crash Report Information

Wil Shipley shows how an application can add information to a crash log by assigning to a special string variable. I see the same technique used in Apple’s source for configd: /* CrashReporter info */...

View Article

Presenting BlockAssert

Steven Fisher: For various reasons, you sometimes can’t use NSAssert in a block easily. I’m going to explain why and describe a new macro, BlockAssert, which solves this.

View Article


Debug It!

Mark Bernstein: There are two kinds of tricky bugs. The first is the masquerade party: something is going wrong, it’s clear what the problem is, but that can’t happen. […] One of the great...

View Article

Dealing With Core Data “Phantom Breakpoints”

Vincent Gable links to this great tip: The condition will ignore any private Core Data exceptions (as determined by the class name being prefixed by _NSCoreData) that are used for control flow.

View Article

Finding Undefined Behavior Bugs by Finding Dead Code

John Regehr: In summary, by adopting a solid premise (“developers want to know when code they write can be eliminated based on exploitation of undefined behavior”) the authors of this paper have found...

View Article


GDB To LLDB Command Map

From the LLDB documentation (via Mark Aufflick): Below is a table of GDB commands with the LLDB counterparts. The built in GDB-compatibility aliases in LLDB are also listed. The full lldb command names...

View Article


Reveal 1.0

Reveal is a Mac application that lets you inspect an instrumented iOS app while it runs on the device:Reveal brings the power of tools like Firebug and Web Inspector to iOS developers. See your...

View Article

Defaults for Debugging

To see when AppKit is running different code because your app linked against an older SDK (via Ken Ferry): defaults write bundle-id NSLogUnusualAppConfig -bool YES To slow down table view animations...

View Article

RuntimeWrapping

Kyle Sluder: This project demonstrates how to wrap a C function—specifically, printf(3). Seems like this could be useful for debugging in the field.

View Article

Debugging NSUserDefaults

David Smith wrote a DTrace script for observing CFPreferencesServer.

View Article


Tales From the Crash Mines

Landon Fuller: This has been a deep dive, and I hope that we’ve presented some useful methodologies that you can use to analyze complex or difficult-to-reproduce issues in your own code. Even if you’re...

View Article

Zombies All the Time in Chrome

Avi Drissman notes that Google Chrome has NSZombie-like debugging code running all the time in the release builds.

View Article


Implementing Plausible Crash Recovery

Landon Fuller: The  alternative approach, and what is used on Apple’s 64-bit platforms, is the use of so-called zero-cost exceptions. Rather than recording thread state at runtime, the compiler builds...

View Article

F-Script Anywhere With LLDB

Daniel Jalkut: Today I decided that I need to stop manually copying and pasting these commands, and I need to finally learn the slightest bit about lldb’s Python-based script commands. The fruit of...

View Article


CrashProbe

CrashProbe (via Daniel Jalkut): CrashProbe is a crash reporting test suite presented by HockeyApp that benchmarks and compares popular iOS and Mac OS X crash reporting services. In our effort to ensure...

View Article

The Legacy of GOAL

Pål-Kristian Engstad: In my opinion it was due to one single idea: Interactivity. Think about it: These days we revel in the idea of hot-loading assets, changing shaders on the fly, and interacting via...

View Article

The Safyness of Static Typing

Marcel Weiher:That the compiler is capable of catching (some) bugs using static type checks is undeniably true. However, what is also obviously true is that not all bugs are type errors (for example,...

View Article
Browsing all 159 articles
Browse latest View live




Latest Images