Error Handling: "The Developer Console didn't set the DEVELOPER_LOG trace flag on your user"

ליאור נכתב על ידי ליאור לביא, עודכן בתאריך 28/04/2024

Error Message

The Developer Console didn't set the DEVELOPER_LOG trace flag on your user. Having an active trace flag triggers debug logging. You have [?] MB of the maximum 1,000 MB of debug logs. Before you can edit trace flags, delete some debug logs.

Why Are We Seeing This Error Message?

When we open the Developer Console, we can see under the Logs tab, real-time updating rows that document our system usage. Salesforce allows us to store up to 1000MB of records of this type. The error message presented in this post informs us that there is no more storage space available for our log files.

Solutions

To resolve the log storage issue, you can do one of the following things:

Use the Debug menu

  1.  Click on the Debug menu.
  2. Click on Clear and then select Log Panel.

Use a Keyboard Shortcut

  1. Simply hit the Shift + Alt + G keys to clear the log panel.

Manually Delete All Log Panel Records 

  1. In the Developer Console, click on the Query Editor tab. Developer Console Query Editor.PNG
  2. Write and execute the following query:
    SELECT Id FROM ApexLog
  3. Select all rows in the results table by clicking the first row, scrolling to the bottom of the table, and pressing the Shift key while clicking the last row simultaneously. Developer Console Select All Rows.PNG
  4. Click the Delete Row button and confirm to delete all log rows.
  5. Click the Refresh Grid button to monitor the progress of the deletion by observing the value in the Query Results - Total Rows header.