MENU

Fun & Interesting

Salesforce Developer Tutorial - Apex and LWC Debugging Techniques

Coding With The Force 13,867 4 years ago
Video Not Working? Fix It Now

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: https://www.paypal.com/donate?business=RNHEF8ZWKKLDG¤cy_code=USD Get Coding With The Force Merch Here: https://my-store-d20559.creator-spring.com/ Chrome DevTools Course: https://youtu.be/Y3u2groOG-A Interactive and replay debugger tutorial: https://youtu.be/RD1n2W3wFEA Order of Process Execution in Saleforce: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm Follow all of our social media here: Patreon: https://www.patreon.com/CodingWithTheForce Github: https://github.com/Coding-With-The-Force Facebook: https://www.facebook.com/codingwiththeforce/ Twitter: https://twitter.com/Coding_Force Instagram: https://www.instagram.com/codingwiththeforce/ Salesforce development books I recommend: Advanced Apex Programming: https://amzn.to/3lXi8to Salesforce Lightning Platform Enterprise Architecture: https://amzn.to/2R0D4BQ Mastering Salesforce DevOps: https://amzn.to/3lTtTRN Apex Design Patterns Book: https://amzn.to/3DwqljP Good Non-SF Specific Development Books: Clean Code: https://amzn.to/35PuMDU Clean Architecture: https://amzn.to/35FYo6A Design Patterns: Elements of Reusable Object-Oriented Software Book: https://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 YouTube 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

Comment