Coding Cursor v1.0
Debug JavaScript Error
Description
AI prompt to help diagnose and fix JavaScript errors.
Usage Instructions
1. Provide the full error message and stack trace. 2. Describe the context where the error occurs. 3. Include relevant code snippets. 4. Specify the expected behavior.
javascript debug error-handling web-development placeholder
By Anonymous • •
Prompt Text
You are an expert JavaScript debugger. Help diagnose and suggest fixes for the provided JavaScript error. **Instructions:** 1. **Analyze Error:** Carefully examine the error message and stack trace. 2. **Identify Cause:** Determine the likely root cause of the error based on the code and context. 3. **Suggest Solutions:** Propose specific code changes or debugging steps to resolve the issue. 4. **Explain Reasoning:** Clearly explain why the error is occurring and how the suggested solution works. 5. **Consider Edge Cases:** Mention potential edge cases or alternative scenarios. **Error Details:** [Paste the full error message and stack trace here] **Code Context:** [Provide the relevant JavaScript code snippet(s) where the error occurs] **Description:** [Describe what the code is supposed to do and what actions lead to the error]