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.

Join the conversation

Show comments Hide comments
+ -
  • paulmclaren

    I have follow the instruction but I'm unable to get Visual Studio 2008 to start the blackberry browser when I press F5. It just wait there. If I go into Browse with and select Browse, blackberry browser work fine, etc but every time I press F5, it does not appear to communicate with it (ie blackberry browser is not being refresh, etc)?

    Any idea why?


    Paul McLaren

  • Prosanta

    Hi Paul,

    Could you please confirm that you have your shortcut key set to 'F5'? The instructions above are for default values of Visual Studio. Also if you use the Debug menu (as shown in the third image), what happens?

    To check your default keys, click Tools -> Options.
    In the 'Environment' list, click 'Keyboard', and scroll down to 'Debug.Start' in the scroll box that appears. Your Shortcut key should be F5 there. If it isn't, then make note of what it is, and click 'cancel' and then push the shortcut key to launch the BlackBerry Browser (instead of F5).

    The device simulator itself won't refresh by pushing the F5 key. The F5 key is the shortcut that is used for most desktop browsers to refresh. In the BlackBerry simulator, if you want to refresh the page, you have to click on the BlackBerry Menu key (in the simulator), and then Refresh.



  • Pavel

    I have similar issue with my BB simulator when trying to get to work for debugging a web app.
    I have the latest BB web plug-in for my VS 2008 running on 64-bit Windows Server R2.
    I can't debug a page using the BB browser – the VS just waits and does not launch the BB simulator. The simulator actually starts up only when I kill the current debug session, but then it's worthless cause I can't debug the page; and my VS is not responding until I kill the simulator.
    Same as Paul I can browse a page through the simulator, but can not debug it.
    I'd also like to report on a screen refresh problem I noticed a regarding using the simulator.
    In order to see any screen updates I have to move another window over the simulator screen to force it repaint the screen – very annoying and frustrating.

  • Bctsang

    Hi Prosanta,

    I've just installed the Web Plug-in and i'm using VS Web Developer 2008 Express Edition. I'm not seeing the BlackBerry Browser option in the Browse With screen. Is it because i'm using Express? Is there a workaround on this?


  • Nishant Teria your tutorial ,I couldnt find the way to answer by below question
    1 Does the code behind files like .aspx.vb works same way on blackberry as for IE.What I mean to say is can we have app for blackberry the way we have for normal websites.

blog comments powered by Disqus