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
janirjanir 

stop the execution at breakpoint

Hi,
Is it possible to stop the execution of the flow in apex classes / triggers so that I could put a breakpoint in the apex class and when I hit the breakpoint in the class it would stop the execution and I could step thru the code in the Eclipse IDE and inspect the variables ?
This is a very good way of learning how the code works and which code is executed in different scenarios.
This is possible in non-cloud normal app development with Java
I know that it is possible to set debug log statements in the code and then run thru the code and it would print the result but this is not nearly as easy as stepping thru the code.
Thanks, Jani
Cory CowgillCory Cowgill
No you cannot do this with Salesforce.com multi-tenant runtime. You do not have hooks into the actual runtime so you cannot do this and there is no tools provided by SFDC to allow this since they don't want people to freeze processes on the servers to do debugging. I

I agree debugging with breakpoints is very helpful in Java and non-cloud based platforms but unfortanetly Salesforce.com does not support it.

Perhaps sometime in the future they could find a way to accomodate it. Post it as an Idea on the Idea Exchange!

http://wiki.developerforce.com/page/Multi_Tenant_Architecture
janirjanir
Hi,
thanks for the link. I actually already made a post to the idea exchange regarding the topic. The idea was actually about emulating and running SF in your own hardware, if you could do this then you have full control over the environment and you could hook up a debugger to the runtime and stop the execution. I kind of understand that you are not able to stop the execution because of the shared resources and the multi-tenant architecture but I think it would be possible to implement somehow (one idea is to emulate the environment in your own hw).
Implementing this is another story.... I leave that to the SF developers.
Br,
Jani
khillan bhardwajkhillan bhardwaj
Hi Janir,
There is no way to add breakpoint  in the apex code like we can add in Jave plateform .net plateform. the check the value in variable we generally use Debug in the apex code

Thanks