Test Your Debugger Setup
To make sure that everything is functioning properly, create a
simple Apex class, set a
breakpoint in your code, and then hit the breakpoint using Execute
Anonymous.
-
Create an Apex
class called SampleClass with this
content.
- Save the class.
-
If you don’t have Work Online enabled, save the class to the server.
Right-click the class in the Package Explorer, then choose . This screenshot shows that Work Online is not enabled (1), and
demonstrates how to save to the server (2).

- Switch to the Debug perspective by choosing . After you’ve completed the initial Debugger setup, you can switch between perspectives by clicking the icons in the upper right corner of your Eclipse window.
-
Click the debug icon (
) in
the toolbar and select Debug Configurations.
- Select Remote Apex Debugger.
-
To create a configuration for your project, click the New launch configuration
icon (
).
- Name the configuration.
- Click Browse and select your project.
- Click Apply, and then click Debug.
-
Click the debug icon (
) and
launch the new debug configuration.
-
Wait until you see an icon showing turning yellow gears in the Debug
pane.

-
To set a breakpoint, double-click in the gray gutter to the left of the System.debug statement in
SampleClass.cls.

- Select the Execute Anonymous tab at the bottom of the screen. If the Execute Anonymous tab isn’t available, choose and add it.
- Make sure that your project is the Active Project.
-
In the Source to execute field, enter:
-
Click Execute Anonymous.
The Debugger stops at the breakpoint (1). The call stack (2) and the values of your variables (3) are displayed. When applicable, a URL showing how each request originated displays next to the request ID in your call stack details.