2

I have taken over a large Silverlight project and been asked to do some basic maintenance to it. One such piece of maintenance is simply to call a method when the user clicks the browsers back button. The previous developer, now away on leave, assures me that the browser back button being pushed invokes a method call "somewhere" in the project.

The problem being that "somewhere" could mean anywhere in roughly 60,000 lines of code. I don't have time to spend tracking this down. So what I am looking for is basically to insert a breakpoint in every single line of my code, press the back button, and see what gets triggered. From there I can step through things to add the functionality requested.

Is there an intelligent way for me to do this that I am overlooking ? Please tell me there is some magical "Insert breakpoints everywhere" button that I've just been overlooking up to now because...why would you ever need to insert breakpoints everywhere?! ;)

Thanks a lot.

4

2 回答 2

1

Do a global search in the solution/project for the string: "Navigat" (not whole word). If the browser back-button click is detected and some logic performed, it is very likely this is detected and handled within an override of one of the event handlers whose name is some variation of "OnNavigatedTo" or "OnNavigatingFrom". The NavigationMode enumeration has a "Back" member which can be the way it is determined that the "Back" button has been clicked, so a search for "NavigationMode.Back" might turn it up as well. Good Luck!

于 2013-02-27T17:54:22.550 回答
0

may be search entire solution for

   if (navigationService.CanGoBack)
                    navigationService.GoBack();
于 2013-02-27T17:52:30.543 回答