Salesforce Developer Tutorial - Apex and LWC Debugging Techniques

Поділитися
Вставка
  • Опубліковано 25 лип 2024
  • In this episode we go over some Apex and Lightning Web Component Debugging techniques. We go over how to traverse through code quickly to find the root of a problem, how to think while debugging, how to use the log panels in the dev console, how to use the devtools debugger for LWC's and much more!
    Please consider donating to help continue to improve the content produced for Coding With The Force: www.paypal.com/donate?busines...
    Get Coding With The Force Merch Here: my-store-d20559.creator-sprin...
    Chrome DevTools Course: • Chrome DevTools Comple...
    Interactive and replay debugger tutorial: • Everything You Need to...
    Order of Process Execution in Saleforce: developer.salesforce.com/docs...
    Follow all of our social media here:
    Patreon: / codingwiththeforce
    Github: github.com/Coding-With-The-Force
    Facebook: / codingwiththeforce
    Twitter: / coding_force
    Instagram: / codingwiththeforce
    Salesforce development books I recommend:
    Advanced Apex Programming: amzn.to/3lXi8to
    Salesforce Lightning Platform Enterprise Architecture: amzn.to/2R0D4BQ
    Mastering Salesforce DevOps: amzn.to/3lTtTRN
    Apex Design Patterns Book: amzn.to/3DwqljP
    Good Non-SF Specific Development Books:
    Clean Code: amzn.to/35PuMDU
    Clean Architecture: amzn.to/35FYo6A
    Design Patterns: Elements of Reusable Object-Oriented Software Book: amzn.to/3LhvHBd
    -----------------------------------------------------------------------------------------------------------------------
    Table of Contents:
    0:00 - Intro
    0:21 - Why is debugging so important?
    2:21 - How to think while debugging
    6:19 - Apex Interactive and Replay Debuggers
    8:56 - How to use "Go to Declaration and Usages" to quickly traverse code
    22:34 - When and how to leverage System.debug to your get back on track
    26:53 - How to use code chunking to debug in desperate situations
    31:01 - How to use the dev console log panels to find code bottlenecks
    35:54 - How and why to enable debug mode for Lightning Components
    39:52 - How to debug Lightning Components using the DevTools Sources panel
    43:55 - Using console.log and JSON.stringify to debug Lightning Components
    50:18 - Outro
    DISCLAIMER: The views and ideas expressed on this UA-cam channel and blog are based on past development experiences and may not always work for your particular scenarios. The advice in these videos may also become outdated as technology advances. They should be used as examples for educational purposes only. Using any shown solutions in your own org is not advisable since they are example scenarios.
    #salesforce #salesforcedeveloper #salesforceadmin

КОМЕНТАРІ • 19

  • @CodingWithTheForce
    @CodingWithTheForce  3 роки тому +5

    One thing I forgot to mention that I should have is that it is in your best interest as a developer to learn the order of execution of events in Salesforce. This is super critical to understand and reference. Otherwise you can get really confused while debugging. Here is a link that outlines that chain of events: developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

  • @abuwahid5241
    @abuwahid5241 Рік тому +1

    Really very useful and detail debugging information, I do mostly similar way but you're very detailed and clear. Thanks for sharing.
    Note: in Salesforce industry people often say, you don't any programming background but I'm sure without that base they can't debug properly and will be blind folded.

  • @david57989
    @david57989 Рік тому

    Thank you so much for making these videos. You have helped me tremendously on my developer journey.

  • @tejassontakke8382
    @tejassontakke8382 2 роки тому

    Much needed, Thank you so much for the awesome video.

  • @whisperingadventurespnw
    @whisperingadventurespnw 2 роки тому +3

    so good. I've been looking all over for a place that explains how to debug LWC's. your videos are so helpful. thank you so much for sharing these.

  • @zulfiyahanim694
    @zulfiyahanim694 7 місяців тому

    I really love your videos, the content, the explanations. Thanks and do more!!!

  • @RealFancasta
    @RealFancasta 2 роки тому

    Thank you for the guides!

  • @isdamful
    @isdamful 3 роки тому +1

    Wohoo awesome!

  • @marcosimfeld2876
    @marcosimfeld2876 2 роки тому

    awesome!!!

  • @jagadishgorapalli8044
    @jagadishgorapalli8044 2 роки тому

    Could you please help me to setup decaorator and usage feature..when hover over on function and press ctrl +B , it is not taking me to the js file and so

  • @shade937
    @shade937 10 місяців тому

    Hey,
    Really interesting video and fully agree. Nothing makes you look so competent as when you solve a complex bug.
    One thought I had. Do you think it would make sense to use Execution Overview to understand what part of the code is performing a DML. For instance, setting contact name on the Subject field on a task?

  • @CrisjunMarRavelo
    @CrisjunMarRavelo 10 місяців тому

    Thanks for the tutorial Matt, this is really well done ❤. I have a question though, does VS code have "Go to Declaration and Usage?" I tried the "Go to Definition" one but it did not really bring me to the apex class that defines the method. Or am I missing something? Sorry I'm just new to this.

  • @johnjeremih
    @johnjeremih 2 роки тому

    Can you show me how to debug variables?

  • @MISO999100999
    @MISO999100999 Рік тому

    What if my LWC's are in experience builder? i don't see those files in Sources there

    • @CodingWithTheForce
      @CodingWithTheForce  Рік тому +1

      They should still be there but they are in a different folder. You do have to be in builder mode however I believe. It’s been a couple months since I’ve done community work. If I get some time I’ll try and go back and find the exact folder for you.

  • @ridhimasaxena6339
    @ridhimasaxena6339 Рік тому

    Which IDE you are using? Is it paid? @codingWithTheForce

  • @biswajitsamantaray3117
    @biswajitsamantaray3117 3 роки тому

    Fflib apex common library creating so many layers of abstraction is surely making it harder for debugging. What I feel by learning is we can make the service classes representing as a specific business workflow and the end, in case of lightning components.

  • @deveshwarhade2453
    @deveshwarhade2453 11 місяців тому

    it seems like Jefferey Dahmer is speaking....