Debugging Errors

The Pieces Copilot in the Pieces for Sublime Text plugin provides AI-powered debugging, making it easier to identify and resolve code issues directly in Sublime Text. This feature accelerates troubleshooting while offering valuable learning opportunities through the AI's suggested fixes.


Using the Debugging Tool

Quickly identify and resolve issues in your code with the Fix A Bug option from Pieces Copilot.

To use the debugging tool:

  1. Select a portion of problematic code

  2. Right-click to open the context menu

  3. Hover over Pieces

  4. Then, hover over Ask Copilot

  5. Lastly, select Fix A Bug from the menu

The debugging function within the Pieces Copilot uses the code's context and semantics to find and rectify issues.

If you encounter a particular error when compiling your code, you can also paste the error code in the text input field at the bottom of Sublime for added specificity.

Pieces Copilot will utilize whichever LLM you have currently active and analyze the issue, then open a Copilot Chat with suggestions, regenerate the code, and provide the option to insert it at the cursor mark—all with fresh code comments.

Why Debug with Pieces Copilot?

Debugging with Pieces Copilot streamlines error resolution by providing AI-driven insights in a seamless experience that integrates naturally into your Sublime Text workflow.

It saves time by eliminating the need to scour the web or sift through lengthy documentation, ensuring your workflow remains focused and distraction-free.

Moreover, every suggested fix comes with a clear explanation, helping you not only resolve issues but also enhance your coding skills along the way.

Updated on