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

Apex Replay Debuggerを試してみた

Shingo Yamazaki
October 30, 2018
4.6k

Apex Replay Debuggerを試してみた

Tokyo Salesforce Developer Group Meetup #19 のLT資料です。

Shingo Yamazaki

October 30, 2018
Tweet

More Decks by Shingo Yamazaki

Transcript

  1. Apex Replay Debugger
    Λࢼͯ͠Έͨ
    2018-10-30
    Tokyo Salesforce Developers Group
    Meetup #19

    View full-size slide

  2. ࣗݾ঺հ
    ࢁ㟒ɹਅޗ


    גࣜձࣾνʔϜεϐϦοτ

    ϓϩμΫτϚωʔδϟʔ
    Twitter: zaki___yama


    Blog: http://dackdive.hateblo.jp/

    View full-size slide

  3. IUUQTSFMFBTFOPUFTEPDTTBMFTGPSDFDPNKBKQXJOUFSSFMFBTFOPUFTSO@WTDPEF@SFQMBZ@EFCVHHFSIUN

    View full-size slide

  4. Apex Replay Debugger ͱ͸
    • VSCode ͷ֦ுػೳ
    • Apex ͷσόοάϩάϑΝΠϧ͔Βɺϩάग़ྗ
    ࣌ͷ Apex ͷ࣮ߦΛ࠶ݱ (Replay) Ͱ͖Δ
    • →VSCode ্Ͱ Apex Λεςοϓ࣮ߦͨ͠Γ
    Breakpoint Λஔ͍ͨΓͰ͖Δ

    View full-size slide

  5. ࣄલ४උ
    • Salesforce CLI ΛΠϯετʔϧ
    • VSCode ͷ Salesforce ֦ுػೳΛΠϯετʔϧ
    • https://marketplace.visualstudio.com/items?
    itemName=salesforce.salesforcedx-vscode
    • VSCode ͷઃఆͷͨΊ .vscode/launch.json ͱ͍͏ϑΝΠϧΛ࡞
    ੒͢ΔʢׂѪʣ
    IUUQTNBSLFUQMBDFWJTVBMTUVEJPDPNJUFNT JUFN/BNFTBMFTGPSDFTBMFTGPSDFEYWTDPEFBQFYSFQMBZEFCVHHFS
    ͷl1SFSFRVJTJUFTll4FU6Q"QFY3FQMBZ%FCVHHFSzΛࢀর

    View full-size slide

  6. ྲྀΕ
    1. Apex ͷϩάϨϕϧΛFINESTʹ
    2. ιʔείʔυ্ͷ೚ҙͷߦʹ Checkpoint Λஔ͘
    3. Checkpoint Λ૊৫ʹ൓ө
    4. Apex ࣮ߦ (ը໘ʗςετίʔυʗExecute Anonymous)
    5. ϩάऔಘ
    6. ϩάϑΝΠϧΛ։͖ɺApex Replay Debugger Λىಈ
    7. ιʔεͷमਖ਼ͱ࠶σϓϩΠ
    8. 2~7 ͷ܁Γฦ͠

    View full-size slide

  7. ஫ҙࣄ߲
    • Checkpoint ͸5ݸ·Ͱ
    • Checkpoint ͷ༗ޮظؒ͸30෼
    • Ұ౓ʹ replay Ͱ͖Δͷ͸1ϑΝΠϧ෼ͷΈ
    • ඇಉظॲཧͳͲͷ৔߹͸஫ҙ͕ඞཁ

    View full-size slide

  8. ͓·͚
    ʢΑ͘Θ͔Βͳ͔ͬͨ͜ͱʣ

    View full-size slide

  9. Checkpoint ͱ Breakpoint
    Checkpoint ͷํ੍͕໿͕͋Δ͚Ͳଟ͘ͷ৘ใΛ
    ؚΜͰ͍ΔɺΒ͍͠ʁ
    IUUQTNBSLFUQMBDFWJTVBMTUVEJPDPNJUFNT JUFN/BNFTBMFTGPSDFTBMFTGPSDFEYWTDPEFBQFYSFQMBZEFCVHHFS
    ͷl1SFSFRVJTJUFTll4FU6Q"QFY3FQMBZ%FCVHHFSzΛࢀর

    View full-size slide

  10. Checkpoint ͱ Breakpoint
    ɾ௕͍จࣈྻ͸#SFBLQPJOUͩͱলུ͞ΕΔ
    ɾαϒΫΤϦͰऔಘͨ͠ΦϒδΣΫτ͕͋Δ৔߹ɺ
    #SFBLQPJOUͰḷΕΔͷ͸֊૚͚ͩ

    View full-size slide

  11. Apex Debugger
    (ͱ ISV Customer Debugger)

    View full-size slide

  12. Apex Debugger
    (ͱ ISV Customer Debugger)
    • ͪ͜Β͸
    • ର৅૊৫͸ Scratch Org ݶఆ
    • ࢖͑Δͷ͸ Performance Edition ͱ Unlimited Edition
    ݶఆͰɺͦΕҎ֎͸༗ঈ
    • ISV Customer Debugger ΋ͪ͜Βʹؚ·ΕΔ
    • ύοέʔδΛΠϯετʔϧͨ͠૊৫ͰσόοάͰ͖Δ

    View full-size slide