6

I'm working on an Apex class that contains a method annotated with @future. Inside of the method I have a few system.debug statements I'm using to figure out why it's not working. The problem is -- if I run my code via the Developer Console and inspect the execution log, it only shows up about half the time. Why?

1 Answer 1

9

The problem was -- I was executing anonymous code and checking the "Open Log" option. The call was actually generating two separate logs -- one for the anonymous code, and another for FutureHandler, and one or the other would open randomly. This is what made it seem like it was only working some of the time. So instead, I clicked on the Logs tab in the lower pane of the Developer Console and there they both were. Just make sure you click on the FutureHandler one :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .