function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Basic Help w/ Apex Debugging


I'm very new to the apex development process.  I have some classes and triggers in a sandbox which are functional (tested through regular use of salesforce ui), but I can't get any debugging functionality to work. 

Should I be using the Execute Anonymous section of eclipse?  How exactly do you format the "Source to execute"?  Will debugging messages be visible there?



There are two ways to get some debugging info and you already figured out one of them.
And the other one is the same you just access it through the UI of salesforce.

The Anonymous Window. You see it in eclipse but you can get to in through the UI by clicking on the System Log link at the top of the screen next to the Setup link.

Both windows do the same thing and act the same.

You can write code in these windows and execute your code the same way you would in a class.

- I want to test a static method on a class, just type:


  Click the excute button and off you go.

- Or if your trigger does something on account insert you can type:
Account test = new Account(field1=value,field2=value...); 
insert test;

 Test it out and good luck