Develop your Apex code in a sandbox and debug it with the Developer Console and debug
logs. Unit-test your code, then distribute it to customers using packages.
Debugging Apex
Apex provides debugging support. You can debug your Apex code using the Developer Console and debug logs.
Testing Apex
Apex provides a testing framework that allows you to write unit tests, run your tests, check test results, and have code coverage results.
Deploying Apex
You can't develop Apex in your Salesforce production org. Your development work is done in a sandbox, in a scratch org, or in a Developer Edition org.
Apex in Managed Packages
Learn how to develop, distribute, and use managed Apex. Apex in managed packages can behave differently than Apex in unmanaged packages or Apex deployed directly to an org. Managed package developers and subscribers must understand these differences so that they can safely evolve their packages and integrations.