W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
58 questions for “Debugging & Profiling”
Found in 1 field. Select a question to see its full answer.
Matching topics
Python
Debugging
&
Profiling
15
Node.js
Debugging
& Diagnostics
1
Node.js
Performance Optimization &
Profiling
1
Information Technology
58 questions in 3 technologies
#
Question
Technology
Topic
Level
1
How do you use print statements effectively for
debugging
, including showing variable names alongside values?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Beginner
2
How do assert statements work for
debugging
, and why should they NOT be relied upon for production input validation?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Intermediate
3
How do you use Python's built-in 'warnings' module to surface deprecated or risky code paths during
debugging
?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Intermediate
4
How do you use pdb's post-mortem
debugging
mode to inspect a program's state exactly at the point where an unhandled exception occurred?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Advanced
5
How do you use the timeit module to accurately measure a small code snippet's execution time?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Intermediate
6
How do you use cProfile to identify which functions are consuming the most time in a larger program?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Intermediate
7
How would you use the 'faulthandler' module to diagnose a program that crashes with a segmentation fault, typically from a C extension?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Advanced
8
How would you use line_profiler (a third-party tool) to get LINE-BY-LINE timing information within a specific function, more granular than cProfile's function-level data?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Advanced
9
How would you use py-spy (a sampling profiler) to profile a running Python process in PRODUCTION without restarting it or adding any code changes?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Advanced
10
How do you use the built-in pdb debugger to pause execution at a specific line?
Python › Debugging & Profiling
Python
Debugging
&
Profiling
Beginner
Show all 58 questions in Information Technology