Debugging Assistant

Debugging

Learn how Cody helps you identify and fix errors in your code, making your debugging process faster and more efficient.

Cody is optimized to identify and fix errors in your code. Its debugging capabilities and autocomplete suggestions can significantly accelerate your debugging process, increasing developer productivity. All Cody IDE extensions (VS Code, JetBrains) support code debugging and fixes.

Chat for Code Fixes

Use the chat interface to ask Cody about errors and get corrected code snippets.

Code Actions

Get quick fixes for errors directly in your IDE with Cody's Code Actions.

Detect Code Smells

Identify potential issues early to ensure coding best practices and quality.

Use Chat for Code Fixes

When you encounter a code error, you can use the chat interface and ask Cody about it. Paste the faulty code snippets directly in the chat window, and Cody will provide a fix.

Example Code
function sum(a, b) {
    var result = a + b;
    console.log('The sum is: ' + $result);
}

sum(3, 4);

Cody can help you identify the error and provide a solution to fix it. Simply paste the code snippet inside the Cody chat window and ask Cody to fix it.

Detecting Code Smells

Cody can detect early code smells to ensure coding best practices and quality. By detecting potential errors early, you can avoid scalability and maintainability issues.

  • Find Code Smells

    Use the find-code-smells prompt from the Prompts drop-down menu in the chat panel.

  • Custom Prompts

    Create custom prompts in the Prompt Library to refine your debugging process.

Code Actions

Code Actions are available in the Cody VS Code extension. When you make a mistake while writing code, Cody's Code Actions provide quick fixes.

Step 1: Click the Lightbulb Icon

When a red warning appears, click the lightbulb icon in the project file.

Step 2: Select "Ask Cody to Fix"

Choose the "Ask Cody to fix" option from the menu.

Step 3: Review the Fix

Cody will provide a quick fix that you can accept, reject, or view in the diff view.

Next Steps