Contact Salesforce to Enable the Apex Debugger

Some services and subscriptions include the debugging feature for an extra cost. For pricing details, contact your Salesforce account executive. After Salesforce grants licenses for the Apex Debugger to your production org, match your production license counts to your sandbox.
Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance (one session included), and Unlimited (one session included) Editions

User Permissions Needed
To match licenses to sandbox: Modify All Data

The matching process updates the license counts in your sandbox so that they match production. The process adds licenses to your sandbox that are in production but not in your sandbox, and deletes licenses from your sandbox that aren’t in production.

To match licenses to a sandbox org, log in to your sandbox org. From Setup, enter Company Information in the Quick Find box, then select Company Information | Match Production Licenses. This process triggers an alert informing you that the matching process has started. After all licenses have been matched in sandbox, a confirmation email is sent to you. The confirmation email is always sent to the user who initiates the license copy.

Matching production licenses requires that your sandbox and production orgs are on the same Salesforce release. If your sandbox has already been upgraded to the next release but production hasn’t been upgraded (for example, during sandbox preview), you can’t match production licenses in sandbox.