0

I have a C# WPF Application code, which I want to understand. I am using f11 and f10 to step-in and step-over. However, once my application begins, I don't know which part of the code is executing.

Here is what I want:

I want to know which part of the code is getting executed even after the application begins and as and when I click on menu in the application, I want to see which part of code is being executed.

Please I am new to c# VS 2012 and WPF. Help me in analyzing the application code.

Rakesh
  • 29
  • 2
  • 9

2 Answers2

2

You have a few options:

  1. Click Pause when running, and then Step Into. This will bring you to the line being called when you click on a button or menu item for example.
  2. Set a break point at the point you want it to break.
  3. Inside your code, place Debugger.Break() to stop the debugger at a specific line of code.
Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
0

here are some steps you can follow.

  • Start your debugging from f10 not from F5. this will start you application under debug mode but from start evetn from main method.

  • while runing application under debug mode you can use pause button to peek into where your code is running right now.

  • Use F11 when you wish to go in to the code(code need to be in your source tree.) to see what calling function is doing.

Use mode Debug while following these steps.

JSJ
  • 5,653
  • 3
  • 25
  • 32