Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Debugger の Tips

Debugger の Tips

Toshihiro Morimoto

November 13, 2013
Tweet

More Decks by Toshihiro Morimoto

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ http://about.me/dealforest iOS APP / Web Application(perl, ruby) / Flash

    @dealforest Toshihro Morimoto 13೥11݄13೔ਫ༵೔
  2. ࠓճఆٛ͢Δ Command •pv ίϚϯυΛఆٛ • (lldb) pv • po [[[UIApplication

    sharedApplication] keyWindow] recursiveDescription] ɹ Λ࣮ߦ • (lldb) pv self.view • po [self.view recursiveDescription] Λ࣮ߦ 13೥11݄13೔ਫ༵೔
  3. GDB ͷ৔߹ ~/.gdbinit define pv if $argc == 0 po

    [[[UIApplication sharedApplication] keyWindow] recursiveDescription] end if $argc == 1 po [$arg0 recursiveDescription] end end 13೥11݄13೔ਫ༵೔
  4. LLDB ͷ৔߹ ~/.lldbinit command regex pv \ 's/^[[:space:]]*$/ po [[[UIApplication

    sharedApplication] keyWindow] recursiveDescription]/' \ 's/^(.+)$/ po [%1 recursiveDescription]/' 13೥11݄13೔ਫ༵೔
  5. ଞʹศརͳ Command ~/.gdbinit define st po [NSThread callStackSymbols] end ~/.lldbinit

    command regex st 's/^[[:space:]]*$/po [NSThread callStackSymbols]/' stacktrace Λදࣔ͢Δ 13೥11݄13೔ਫ༵೔