---
schema_version: "1"
id: b97f87f1bed68bc87c107148aac76d6267f091f610e67bd4b029a25cb71f79de
title: Debug Your Code
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/debugging_your_code.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.debugging_your_code.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 340df516df4cf3c6544e359dfde9467f06c1ee22a43e03e4cc2c93c37995faf7
description: Use checkpoints, logs, and the View State tab to help debug the code you’ve written.
products:
  - Salesforce Platform
release: "264"
---
# Debug Your Code

Use checkpoints, logs, and the View State tab to help debug the code you’ve written.

- **[Set Checkpoints in Apex Code](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_checkpoints_setting.htm&release=264.0.0&type=5)**  
    Use Developer Console checkpoints to debug your Apex classes and triggers. You can’t set checkpoints in Visualforce markup.
- **[Overlaying Apex Code and SOQL Statements](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_checkpoints_overlaying_soql.htm&release=264.0.0&type=5)**  
    Use the Developer Console to overlay diagnostics that run when Apex code executes at a checkpoint, without changing any code.
- **[Checkpoint Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_view_checkpoints.htm&release=264.0.0&type=5)**  
    Use checkpoints to investigate the objects in memory at a specific point of execution and see the other objects with references to them.
- **[Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_view_system_log.htm&release=264.0.0&type=5)**  
    The Log Inspector is a context-sensitive execution viewer in the Developer Console. It shows the source of an operation, what triggered the operation, and what occurred next. Use this tool to inspect debug logs that include database events, Apex processing, workflow, and validation logic.
- **[Use Custom Perspectives in the Log Inspector](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_perspectives.htm&release=264.0.0&type=5)**  
    A perspective is a predefined layout of panels in the Log Inspector.
- **[Debug Logs](https://help.salesforce.com/s/articleView?id=platform.code_debug_log.htm&release=264.0.0&type=5)**  
    Use debug logs to track events that occur in your org. Debug logs are generated when you have active user-based trace flags, when you run Apex tests, and when executed code or API requests include debugging parameters or headers.

#### See Also

- [Work With APIs](https://help.salesforce.com/s/articleView?id=platform.work_with_apis.htm&release=264.0.0&type=5 "Salesforce provides programmatic access to your org’s information using simple, powerful, and secure application programming interfaces.")
- [Write Code](https://help.salesforce.com/s/articleView?id=platform.writing_code.htm&release=264.0.0&type=5 "Write code using the Apex programming language to add business logic or use the Visualforce markup language to create the user interface. Integrate your application using APIs and authenticate your external applications.")
- [Test Your Changes](https://help.salesforce.com/s/articleView?id=platform.testing_your_code.htm&release=264.0.0&type=5 "Testing is key to the success of your application, particularly if you deploy your application to customers. If you validate that your application works as expected with no unexpected behavior, your customers are going to trust you more.")
- [Secure Your Code](https://help.salesforce.com/s/articleView?id=platform.securing_your_code.htm&release=264.0.0&type=5 "This section contains information about implementing security in your code.")