Force.com IDE Developer Guide
Newer Version Available
Explore a Simple Debugging Puzzle
Force.com IDE is in a maintenance-only state. We still provide support for the product through our official channels, but updates prior to October 12, 2019 will be only for critical security issues that arise. On October 12, 2019, we will no longer provide support or updates of any kind for Force.com IDE. On that date, we will also begin archiving documentation and removing download links for the product. We recommend that you start migrating to Salesforce Extensions for Visual Studio Code or one of the great tools made by our partners. For more information, see The Future of Salesforce IDEs on the Salesforce Developers Blog.
Warning
-
Create Sample Accounts in Your Org
To complete this exercise, add the following sample data in your org. -
Create an Apex Class
Next, let’s create an Apex class to debug. This class removes cold accounts from a list so that you can focus on more promising clients. -
Create a Visualforce Page
Now we need a Visualforce page to bring the AccountViewer controller to life. -
Identify a Problem
Because we never write buggy code, our Visualforce page should be working perfectly! Let’s make sure. -
Debug the Problem
Let’s use the Apex Debugger to see what went wrong. -
Fix the Problem
By now you’ve discovered how to fix the problem in AccountViewerController.cls. But you can’t save changes to code while a debugging session is in process. Terminate the debugging session, and then fix the code. -
Delete Your Sample Accounts
Unless you want to keep your sample accounts so that you can play with them in the future, run this code to delete them.