---
schema_version: "1"
id: 4f70596b61e8dda998501d98e08636fc0d4d360abfcb20bf80aa74f98c770906
title: Debug Apex Code
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfvscode/guides/programming-languages/apex/apex-debugging.md
canonical_url: https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/apex-debugging.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5310e78a6390779a0315d89cbba972a4022c9633ec207c2253db451942215ed8
products:
  - Salesforce Extensions for Visual Studio Code
  - salesforcedx
---
# Debug Apex Code

The Salesforce Extension pack comes with rich debugging options for every developer, regardless of where you land on the low- to pro-code continuum. Use this information to figure out which Apex debugger is right for you:


| Debugger                                                  | License Requirements                                                                                                                                                                                                                                                                                                                              | Features                                                                          |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Replay Debugger](https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/debuggers/replay-debugger.md)           | None. Free.                                                                                                                                                                                                                                                                                                                                       | Easy to use. Use debug logs to “replay” events. Your debugger for most use cases. |
| [Interactive Debugger](https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/debuggers/interactive-debugger.md) | - One free license in Performance and Unlimited Edition orgs.<br>- Available for purchase in Enterprise Edition orgs.<br>- Not available in Trial and Developer Edition orgs.<br>- Can be used in scratch orgs using the DebugApex feature. To use the debugger in a scratch org, the associated Dev Hub org must have the Apex Debugger license. | A powerful debugger that lets you view and pause events in real time.             |
| [ISV Debugger](https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/debuggers/isv-debugger.md)                 | - Available in subscriber sandbox orgs and scratch orgs.<br>- Can be used in scratch orgs using the DebugApex feature. To use the debugger in a scratch org, the associated Dev Hub org must have the Apex Debuggerlicense. For ISVs, this is their Partner Business Org (PBO).                                                                   | Use to debug managed package code directly in customer orgs in real time.         |

## See Also

- [Debug Logs](https://help.salesforce.com/s/articleView?id=platform.code_debug_log.htm&type=5)
- [Find and Fix Bugs with Apex Replay Debugger](https://trailhead.salesforce.com/content/learn/projects/find-and-fix-bugs-with-apex-replay-debugger)
- [Debug Log Filtering for Apex Classes and Apex Triggers](https://help.salesforce.com/s/articleView?id=platform.code_debug_log_classes.htm&type=5)
- [Scratch Org Features](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm)
- [Enable 'Manage Your Apex Debugger Sessions' in Lightning Experience](https://help.salesforce.com/s/articleView?id=000382135&type=1)

