BlackBerry Web Plug-in for Microsoft Visual Studio – Setting the default browser

Tips and Tricks

One of the questions I’m seeing coming across my desk more frequently is “How do I set my default browser to be the BlackBerry® Browser in Microsoft® Visual Studio®?”

The beauty of using the BlackBerry Web Plug-In for Microsoft Visual Studio is that it integrates seamlessly in with the development environment. What that means is that you would switch over to the BlackBerry simulator as your default browser the same way you would switch browsers if you were debugging a desktop site.

Before we get into the specific steps, I’d like to quickly go over what the Browse With button actually does and how it differs from debugging a website. When you set a browser using the Browse With functionality, and select to Browse the page immediately, you are actually using the preview version of the website so you won’t be hitting any of the breakpoints that you normally would. That’s an important concept to remember when using this feature, and something that I’m sure most web developers have done at some point before. In the Browse With window, there’s also an option to set the browser as your default browser. If you hit cancel after setting a default browser, that browser selection is still your default browser so you’re now able to debug using that browser.

Some more documentation and further details can be found on Microsoft’s website and blog.

So now let’s get into how you can set the BlackBerry Browser to be the default browser to debug your web application in. Assuming you already have a web application ready to debug, right click on the web application in the Solution Explorer and select “Browse With…”

Now select the BlackBerry Browser and click “Set as Default” (as shown in the first picture above). Next click on “Cancel” since we want to debug the site instead of run it in release mode. Now you should be back in the base Microsoft Visual Studio window. Since you’ve hit cancel on the Browse With window, your default browser will be set to the BlackBerry Browser however you won’t have any other browsers running, and you’ll be in coding mode in Microsoft Visual Studio.

To begin debugging, either push “F5” or from the debug menu, select “Start Debugging”.

This will launch the BlackBerry Smartphone Simulator, and you’ll be able to begin debugging your website.

I hope that answers some of the questions around the Browse With functionality and how to set the BlackBerry Browser to be the default browser when using Microsoft Visual Studio. Please feel free to leave any comments or questions below.

About Prosanta B.

Prosanta is a member of the BlackBerry Developer Relations team specializing in Web Development. Prosanta’s focus is on developing out the web platform and tools associated with web development while supporting the development efforts of a number of Independent Software Vendors. Prior to joining RIM, Prosanta had worked on numerous web portals for major multinational firms writing both front and backend code.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus