+ Start a Discussion
Patrick Arkesteyn 2Patrick Arkesteyn 2 

Force.com IDE debug web services


I'm a beginning Force.com IDE user. Great product !

I would like to debug a web service developed by other guys, who left the company. 
This is the code for the test class:

private class WS01_Account_GetUpdate_TEST {
    private static testMethod void getAccountsTest() {
        Account acc = testUtils.createAccount('testAccount');
        insert acc;
        DateTime dateTimeValue = DateTime.now().addMonths(-1);
        RestRequest req = new RestRequest();
        RestResponse res = new RestResponse();
        req.requestURI = '/services/apexrest/Accounts/';
        req.httpMethod = 'GET';
        RestContext.request = req;
        RestContext.request.params.put('iRefDateTime', String.valueOf(dateTimeValue));
        RestContext.response= res;

My question is what to type in "Source to execute" in the "Execute Asynchronous" tab in Debug perspective.
I tried with:

new WS01_Account_GetUpdate_TEST().getAccountsTest();

But I'm getting :

Compile error at line 1 column 1
Type is not visible: WS01_Account_GetUpdate_TEST

Can anybody help me out here please ?

Many thanks in advance,


To debug, you should check the web service class - WS01_Account_GetUpdate.getAccountWithoutIdTEPORTAL();

To execute this test class in eclipse, please create test class suit config as mentioned in below doc
Patrick Arkesteyn 2Patrick Arkesteyn 2

Apparently the way to go was using a Run Configuration.
Now I'm facing another problem: when stopping at a breakpoint, I don't see how to add a watch expression.
Is that impossible in Force.com IDE ?
Yes you can do that.. Hope below doc will be helfull.. I use dev console to debug the code.
Patrick Arkesteyn 2Patrick Arkesteyn 2

You can do a lot, but watch expressions are not supported.

Thanks anyway !