peter
peter

Reputation: 8682

Debugging Window applications

i have windowapplication project which contain so many forms ,,i need to debug the application ,,but i dont know which code is related to which UI window,..Is there any way to find the code which correspond to related window

Upvotes: 0

Views: 113

Answers (2)

Mehmet Aras
Mehmet Aras

Reputation: 5374

I think you're looking for an easy way to locate the code for a particular form easily without having to go through the entire codebase to determine what code goes with what form. Unfortunately, there are no easy ways that I am aware of. However, there are a couple of things that you can try:

  • If the form you're looking at has some sort of a lengthy operation and you're quick enough :-), you can trigger that operation and immediately do 'Break All' from the debug menu or hit 'Ctrl+Alt+Break' to break the execution right there and examine the stack trace.
  • You can profile your application e.g. performance exporer in VS2008 and then examine the profiler reports to get some hints as to what code is getting called. This may pinpoint or at least narrow down the code you're looking for.

Just a couple of ideas that might helpful.

Upvotes: 1

PVitt
PVitt

Reputation: 11770

  • Open the windows and press 'F7'
  • Right click on the form and say "View code"
  • Right click the form in Solution explorer and say "View code"

If you mean other files not related to the UI you can do a "Find all references" when you right click on a specific function. This shows you all places where this function is called.

Upvotes: 1

Related Questions