Last Update:
November 7, 2024

This is a debugging prompt designed for code analysis to identify why a function is not performing as expected. The users shall describe the expected bahaviors vs the actual behaviors to ChatGPT.
Special Note: Avoid uploading sensitive or confidential information to the AI.
Assume the role of a senior programmer well-versed in [language]. Debug the following function. Analyze why it is not achieving the intended result and identify any issues. The function is expected to [expected behavior], but it currently [current behavior].
<< Attach Code >>
Assume the role of a senior programmer well-versed in C++. Debug the following function. Analyze why it is not achieving the intended result and identify any issues. The function is expected to calculate the factorial of a number, but it currently returns 1 for all inputs.
Disclaimer: You are advised to research, understand, and test these prompts and their outputs. Adjust them as needed to fit your specific requirements. Use these prompts at your own risk, as outputs may not be correct. Follow best practices when using AI, keeping in mind potential security and privacy risks. Avoid uploading sensitive or confidential information. The user is solely responsible for any outcomes resulting from the use of these prompts.
Please share this article if you like it!
Our site uses cookies. By using this site, you agree to the Privacy Policy and Terms of Use.
No Comment! Be the first one.