Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 475
  • Last Modified:

How to debug MVVM pattern project?

I'm working in an existing application which is implemented in MVVM pattern (C#). I'm struggling while debugging the application such as where the button in the code and on clicking the button which method is executed. I need to put breakpoint to diagnose and error. Could you please assist how to debug the MVVM patten project?
0
Easwaran Paramasivam
Asked:
Easwaran Paramasivam
1 Solution
 
MikeTooleCommented:
Can you post the definition of the button?
The usual approach with mvvm is to link the button to an ICommand in the view-model
If the Button is defined in xaml, there should be an entry like ...
Command="{Binding MyCommand}"
... where MyCommand is a property of the view-model

To debug, you put your breakpoint on the method executing the command in the VM
0
 
Easwaran ParamasivamAuthor Commented:
Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now