---
title: "How to debug a C# program"  
description: "How to debug a C# program"  
author: "Htwe Htwe"  
published: 2013-04-08  
updated: 2013-04-09  
canonical: https://www.mindstick.com/forum/738/how-to-debug-a-c-sharp-program  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# How to debug a C# program

Hi All,\
\
[Please explain](https://www.mindstick.com/forum/344/hi-rohith-i-am-new-for-mvc-please-explain-how-to-set-implicitly-isauthenticated-true) to me how to [debug](https://www.mindstick.com/forum/156/how-to-debug-application-on-the-server) a [C# program](https://www.mindstick.com/forum/156830/how-do-i-make-a-c-sharp-program-that-checks-for-given-array-by-user-which-elements-are-perfect-numbers) using [visual studio](https://www.mindstick.com/articles/12378/visual-studio-for-mac-is-out-of-beta-preview-now-officially-available) with examples.\
\
Thanks And Regards

## Replies

### Reply by AVADHESH PATEL

Hi Htwe!\
For debugging you application follow the below steps\
**Step 1: Breakpoints**\
Breakpoint is used to notify debugger where and when to pause the execution of [program](https://www.mindstick.com/blog/12337/scaling-up-your-mentorship-program). You can put a breakpoint in code by clicking on the side bar of code or by just pressing F9 at the front of the line. \
**Step 2: Step Over**\
After debugger hits the breakpoint, you may need to execute the code line by line. "Step Over" [ F10 ] command is used to execute the code line by line. This will execute the currently highlighted line and then pause. If you select F10 while a method call statement is highlighted, the execution will stop after the next line of the calling statement.\
**Step 3: Step Into**\
This is similar to Step Over. The only difference is, if the current highlighted section is any methods call, the debugger will go inside the method. Shortcut key for Step Into is "F11". \
**Step 4: Step Out**\
This is related when you are debugging inside a method. If you press the Shift - F11 within the current method, then the execution will complete the execution of the method and will pause at the next statement from where it called.


---

Original Source: https://www.mindstick.com/forum/738/how-to-debug-a-c-sharp-program

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
