How to Ask a Debugging Question#
A good debugging question includes enough information for someone else to understand where you are stuck.
The current course syllabus and applicable CSN or college policies take precedence over anything on this website.
Where to ask#
Do not open a Discord help ticket for ordinary homework or debugging questions. Help tickets are for connectivity issues, Bellagio account problems, registration problems, VS Code setup problems, or other private technical access issues.
For homework and debugging issues, use one of these options:
- Post a question in the appropriate course Discord channel without posting your actual code.
- See a teaching assistant or me during scheduled office hours.
- Contact me privately when the question requires private context.
A direct message is usually the most expedient way to reach me. Email may be delayed.
Debugging question template#
Use this structure when asking for debugging help:
Course:
Assignment:
File name:
Command I ran:
Exact error message or output:
What I expected:
What actually happened:
What I already tried:
Specific question:Do not paste your source code into a public Discord channel. Instead, describe where the problem occurs, include the exact command and error message, and say what you already tried.
Compiler messages, command output, filenames, line numbers, and descriptions of the problem are okay to post. Your actual source code is not.
If you used GDB, include the GDB command you ran, the breakpoint you set, and the output you saw. See Debugging with GDB for basic GDB commands.
Example#
Instead of:
My program does not work.Ask:
I am in CS 135 working on assignment 2. I ran:
g++ $CXXFLAGS main.cpp -o main
The compiler says:
main.cpp:17:5: error: expected ';' before 'return'
I expected the program to compile. I checked line 17 but I am not sure which
previous line is causing the problem.That gives the person helping you a specific starting point.