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

Debugging Dyld

Alex Denisov: Recently, I was debugging an interesting issue: a program crashes whenever it tries to call a particular function from a dynamic library. It was not clear how to debug this issue....

View Article


Problems With os_log

BJ Homer: Is there anyone outside Apple who finds the new logging system useful? Seems like it’s annoying and actively intrusive for external developers. The os_log features are useful to Apple, but...

View Article


High Memory Use With Vapor and MySQL

Tanner (via Ilja A. Iwas): MySQL 3.2.4 has been tagged with a fix that reduces peak memory usage by 10-15x for the sample project. See vapor/mysql#232 if you’re interested to see what was...

View Article

Debugging an ARC Mac Application on Snow Leopard

Brian Webster: Thus far, I’ve been doing most of my development and testing using Xcode 4.3 running on OS X 10.7, but I wanted to start to do more thorough testing on 10.6. ARC is supported on both...

View Article

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. Update (2015-04-07): David Smith has posted a newer script.

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
Browsing all 170 articles
Browse latest View live