CopilotHub
SearchPromptsInstructionsAgentsToolsMCPs
  1. Home
  2. Prompts
  3. Explain and Fix a Buggy Function
Back to Prompts

Explain and Fix a Buggy Function

Have Copilot explain what’s wrong with a function and propose a concrete fix.

category:debugging
bugfix
explanation
analysis
0

Prompt

You are a debugging assistant.
  
  1. Read the following function carefully.
  2. Explain in plain language what it is trying to do.
  3. Identify the exact bug(s) or logical issues.
  4. Propose a fixed version of the function.
  5. Briefly explain why your fix works.
  
  Here is the function:
  
  [Paste function here]

Related Prompts

View all →

Analyze a Failing Test with Copilot

Let Copilot explain failing test output and propose fixes.

category:debugginganalysistests+2

Reproduce and Fix a Bug with Guided Logging

Use Copilot to isolate bugs by adding targeted logging and diagnostic output.

category:debuggingloggingbugfix+2

Explain Code Like I’m New to the Project

Let Copilot explain unfamiliar code in simple language for onboarding.

category:learningexplanationonboarding

Optimize a Hot Path for Performance

Ask Copilot to find and optimize bottlenecks in a performance-critical function.

category:debuggingperformanceoptimization

Instrument and Diagnose a Silent Failure

Help Copilot add logging and guards to diagnose code that fails silently.

category:debuggingloggingobservability+1

Update Gradle build for Spring Boot 3

Update build.gradle with Spring Boot 3 plugin and Jakarta EE compatible dependencies.

spring-bootgradlebuild+4
Browse More Prompts

CopilotHub

A curated collection of prompts, instructions, agents, and tools for AI-powered development.

Quick Links

  • Prompts
  • Instructions
  • Agents
  • Tools
  • MCPs
  • Search

Browse by Category

  • Code Generation
  • Debugging
  • Documentation
  • Refactoring
  • Testing
  • Security

Legal

  • Guidelines
  • About
  • Privacy Policy
  • Terms of Service

Community

GitHub

© 2026 CopilotHub.