Does the 3 million character limit on Apex code apply to an SFDX scratch org?

We want to be able to use the debugging (breakpoints etc) that is available in SFDX scratch orgs for our managed packages. One of them has exceeded the default 3 million Apex character limit: developer edition orgs can have this raised via a support case.

Do SFDX scratch orgs impose the 3 million character limit, and if they do is there any way to get that limit raised for scratch orgs?

Answer

I just checked in a Scratch org I created yesterday. It is a standard Developer Edition org.

You are currently using 1,797,594 characters of Apex Code (excluding comments and @isTest annotated classes) in your organization, out of an allowed limit of 10,000,000 characters. Note that the amount in use includes both Apex Classes and Triggers defined in your organization.

Seems that they default to a higher character limit.


More official answer from Salesforce DX Trailblazer community group.

A DE scratch org indeed has a default limit of 10M characters of apex code. We increased the number to accommodate requests for a higher limit and due to the inability to configure this in the scratch definition. We will evaluate if the default should be decreased with an added scratch def feature. [We] are also working on ways to better document the default limits.

Guess it would take too long to wait for Salesforce support to bump up the Apex limit on each new scratch org, so easier to just start with the higher limit.

Attribution
Source : Link , Question Author : Keith C , Answer Author : Daniel Ballinger

Leave a Comment