2

This has been happening for the past month. After an anonymous execution, I try to execute an anonymous script again and open up the log, the script executes but no log is presented. If I shut down the console, reopen and rerun, the log pops up. But then if I try it again, the script runs, but no log.

What's going on with this? I don't even know where to begin to debug this.

Thanks!

4
  • 2
    I've been noticing this same behaviour as well. I've gotten around it by going to the debug log section in setup and adding myself to the watched user list. Commented Jul 31, 2015 at 16:56
  • 2
    It is a pain. Sometime going to Debug -> Change Log Levels and resetting the time works as well, other times not. Dev console is pretty useless except for logs, execution stack, timeline, etc, even then it is buggy.....I really HATE having to go in and set a time every time I open the debug log as well. I should not have to set a time when I first open it. The time thing was the stupidest addition and does nothing to help.....
    – Eric
    Commented Jul 31, 2015 at 17:12
  • I had also face this issue.... But i noticed that when i set debug log --> monitor user, and than clean all debug log after that it always works fine.. Commented Jul 31, 2015 at 18:32
  • Out of curiosity, what instance are you on? I've been getting this on a few (cd17) especially but not others. Commented Jul 31, 2015 at 19:50

1 Answer 1

0

The issue is most likely around the TraceFlag records that the developer console is creating and updating.

These can be accessed via the Tooling API, either the SOAP or the REST versions.

Probably the best starting point is to clear out any existing records. Especially those there the TracedEntityId and/or ScopeId matches the user Id in question.

Clearing the TraceFlags can be a bit tricky by hand. One way to do it is to use Workbench to invoke the Tooling REST API.

Once you have logged into work bench, use the REST Explorer to GET request to:

/services/data/v34.0/tooling/query/?q=SELECT%20Id%20FROM%20TraceFlag

Workbench GET TraceFlags

Take the resulting ID's and send them in a DELETE request to:

/services/data/v34.0/tooling/sobjects/TraceFlag/{ID}

where you have replaced {ID} with the TraceFlag Id to delete.

Alternatively, you can use the free FuseIT SFDC Explorer tool to query the Tooling API for the ID's. Then right click in the Id column and select Delete Entity. (Disclosure: This is a product from my current employer)

Deleting Trace Flag

Opening the Developer Console again should create new TraceFlags with an expiration date in the future.


If the TraceFlags don't fix the issue, you may be having issues with the Streaming API. It is used by the developer console to detect when new logs become available.

Try the following SOQL query when you expect to see a new log entry:

Select Id,LogUserId,LogLength,Request,Operation,Status,StartTime,Location from ApexLog

If it appears there then there is a problem with the Streaming API. Maybe check the browsers developer tools for error messages.

You must log in to answer this question.

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