This is how you debug the .NET server code that handles your BlackBerry application’s requests. You can set breakpoints in the server page or module and have them hit when the BlackBerry simulator makes a request to the server. The steps below use my end-to-end BlackBerry application as an example.
- Open the solution with Visual Studio and set the web application, KowledgeBase.Web.UI in this case, as the startup project.
- Open the web project’s properties, Web tab. Set the handler (BBHandler.ashx) as the start page.

- Set breakpoints in the handler’s code and start the debugger


- Browse to the handler page. See how the breakpoint is hit. Press F5 to go past the breakpoints and allow the ProcessRequest function to return. Now the debugger is attached and you can move on to the BlackBerry project.


- Start the BlackBerry MDS simulator.

- Start debugging your BlackBerry project in your favorite IDE. Make sure the BlackBerry application is pointing to your server project’s URL. You can grab this URL from your browser’s address bar, since VS pointed the browser to it.

- Now you can exercise the functionality that talks to the server. You should be able to step through the server code once you hit the first breakpoint in it.


