Enjoy Breakpoint

Db5cf21a75ebe2484b95ea9dec5f573b?s=47 Shingo Tamaki
February 11, 2017

Enjoy Breakpoint

Swiftのビルドが遅いのでBreakpointを活用して、
アプリを止めずにできるだけデバッグ作業しようという話です。

Db5cf21a75ebe2484b95ea9dec5f573b?s=128

Shingo Tamaki

February 11, 2017
Tweet

Transcript

  1. ENJOY BREAKPOINT

  2. ࣗݾ঺հ

  3. ࣗݾ঺հ ۄ৓৴ޛ iOS Engineer! झຯ" ిࢠ޻࡞⚡ ےτϨ$ ΨδΣοτ%

  4. ! SWIFTͷϏϧυ ஗͍Ͱ͢ΑͶ "

  5. Α͘( ฉ | ޮ )͘SWIFTͷϏϧυߴ଎ԽTIPS ࣄલ४උ > xcprofilerͳͲͰܭଌ https://github.com/giginet/xcprofiler

  6. Α͘( ฉ | ޮ )͘SWIFTͷϏϧυߴ଎ԽTIPS ઃఆϨϕϧ > Optimization Level >

    ϏϧυฒྻԽ > SWIFTWHOLEMODULE_OPTIMIZATION
  7. Α͘( ฉ | ޮ )͘SWIFTͷϏϧυߴ଎ԽTIPS ίʔυϨϕϧ > ܕਪ࿦ͤ͞ͳ͍! > +ΑΓappend

    > ??(nil݁߹ԋࢉࢠ)Λ࢖༻͠ͳ͍
  8. Α͘( ฉ | ޮ )͘SWIFTͷϏϧυߴ଎ԽTIPS http://qiita.com/you_matz/items/e95f30023eccc8d96357 http://sssslide.com/speakerdeck.com/naoto0n2/ buildshi-jian-gai-shan

  9. ରԠ͸͢Δͭ΋Γɺ Ͱ΋༏ઌλεΫ͕ɻ

  10. ͦΜͳ࣌ظͷ ։ൃʹ΋໾ཱͭ BREAKPOINTͷTIPS

  11. ௒جຊత ͳ࢖͍ํ

  12. ௒جຊతͳ࢖͍ํ > ࢭΊ͍ͨॲཧͷߦͷࠨଆΛΫϦοΫͯ͠ϒ ϨΠΫϙΠϯτΛ௥Ճ

  13. লུ

  14. EDIT BREAKPOINT

  15. EDIT BREAKPOINT Condition ࣮ߦ৚݅ ex) foo == bar Ignore ϒϨΠΫͷແࢹճ਺

    ex) ϧʔϓॲཧͰ5ճ໨ͷ͚࣌ͩࢭΊ͍ͨ Action ޙड़ Options Action࣮ߦޙʹϒϨΠΫͤ͞ͳ͍ ex) ActionͰϩάग़ྗͳͲΛͤ͞ଓ͚͍ͨ࣌ͳͲ
  16. ACTION Apple Script Apple Scriptͷ࣮ߦ͕Մೳ ex) ௨஌ηϯλʔʹNotificationΛඈ͹͢ Capture GPU Frame

    OpenGL ESͷඳըঢ়گͷ֬ೝͳͲʹ࢖͏ Debugger Command LLDBίϚϯυͷ࣮ߦ͕Մೳ Log Message γϯϓϧͳςΩετͷϩάग़ྗ͕Մೳ Shell Command γΣϧʹΑΔίϚϯυͷ࣮ߦ͕Մೳ Sound α΢ϯυͷ࠶ੜ͕ઃఆՄೳ
  17. ACTION ΞΫγϣϯ͸ෳ਺௥ՃՄೳ

  18. LOG MESSAGE ୯७ͳϩάग़ྗΛߦ͍͍ͨ࣌ ͳͲʹศར ίϯιʔϧ΁ͷग़ྗ΍ ಡΈ্͛Ի੠Ͱग़ྗͰ͖Δ ίʔυ্ͷม਺Λ@hoge@ͷΑ͏ͳ ܗͰࢦఆͰ͖ͨΓɺ%BͰϒϨΠΫϙΠϯτ໊ɺ %HͰϒϨΠΫϙΠϯτͷ࣮ߦճ਺͕දࣔ͞Ε·͢ɻ Title:

    "Books" viewDidLoad() 1
  19. DEBUG COMMAND po foo po bar = foo env DEBUG=1

    bt ..etc https://lldb.llvm.org/lldb-gdb.html
  20. DEBUG COMMAND CHISEL facebook੡ͷLLDBίϚϯυू https://github.com/facebook/chisel pvc : ViewController֊૚Λίϯιʔϧʹग़ྗ pviews :

    View֊૚Λίϯιʔϧʹग़ྗ border/unborder : ର৅ͷViewʹϘʔμʔΛඳը ...etc
  21. APPLE SCRIPT osascript -e 'display notification "Hello World"'

  22. APPLE SCRIPT MAC AUTOMATION SCRIPTING GUIDE https://developer.apple.com/library/ content/documentation/ LanguagesUtilities/Conceptual/ MacAutomationScriptingGuide/

    index.html#//apple_ref/doc/uid/ TP40016239-CH56-SW1
  23. BREAKPOINTͷڞ༗ Share BreakpointͰνʔϜͰڞ༗ Մೳ ׂͱαΫοͱফ͞ΕΔࣄ΋͋ ΔͷͰॏ༻͢Δ͜ͱ͸গͳ͍ ͔ͳͱࢥ͍·͢...

  24. BREAKPOINTͷڞ༗ READINGMARKER.XCWORKSPACE/XCSHAREDDATA/XCDEBUGGER/ BREAKPOINTS_V2.XCBKPTLIST <?xml version="1.0" encoding="UTF-8"?> <Bucket type = "3"

    version = "2.0"> <Breakpoints> <BreakpointProxy BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> <BreakpointContent shouldBeEnabled = "Yes" ignoreCount = "0" continueAfterRunningActions = "Yes" filePath = "ReadingMarker/ViewControllers/HomeViewController.swift" timestampString = "508462948.98439" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "21" endingLineNumber = "21" landmarkName = "viewDidLoad()" landmarkType = "7"> <Actions> <BreakpointActionProxy ActionExtensionID = "Xcode.BreakpointAction.Log"> <ActionContent message = "Log Message" conveyanceType = "0"> </ActionContent> </BreakpointActionProxy> </Actions> </BreakpointContent> </BreakpointProxy> </Breakpoints> </Bucket>
  25. BREKPOINTΛ׆༻͢Δͱྑ͍఺ ࠶Ϗϧυͷճ਺ΛݮΒͤΔ⤵ ɾσόοάͷͨΊͷίʔυΛॻ͍ͯ࠶Ϗϧυ͠ͳͯ͘΋ྑ͍ ɾ࣮ߦதͰ΋ϩάͷࠩ͠ࠐΈ΋Մೳ

  26. ΑΓָʹͳΔϓϥάΠϯ Tuna https://speakerdeck.com/dealforest/mada-nslog- dexiao-hao-siteirufalse

  27. ࢀߟจݙ ΄΅શ෦ࡌͬͯ·͢!

  28. એ఻

  29. 2/21 FASTLANEษڧձ https://fastlane.connpass.com/event/49623/

  30. 3/13 IOS TEST NIGHT https://testnight.connpass.com/event/49561/

  31. YAHOO HACK DAYग़৔͠·ͨ͠ɻ ʮͻ΋ͱ͖ʯ 3:30:11~3:31:49 https://www.youtube.com/watch?v=oJKTYEJkasU ※ ikesyo/Himotoki͸ಋೖ͍ͯ͠·ͤΜ!

  32. Ҏ্