Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 136
Registered: ‎01-25-2010
My Device: Z30, Z10, Q10, Dev Alpha B & Bold 9900
My Carrier: Bell

Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi,  

 

I have installed the BlackBerry VS9 Plugin 1.2 onto my box. So far, I've only ran into issues and I've only able to run a debug session using a Mickey Mouse approach...

I used the following tutorial:

http://na.blackberry.com/eng/developers/resources/Debugging_Your_First_Web_Application_In_Microsofft...

 

First, when I try running the debug session from VS.Net using the default installed plug-in "BlackBerry Browser", I get the following error :

"Message Queuing has not been installed on this computer"

After searching in different forums & Google, I added a new browser option pointing to "C:\Program Files\Research In Motion\BlackBerry VS9 Plugin 1.2\bin\RIM.Net.Tools.ScriptHost.exe"

Using this new Brower option, seem to resolve the Message Queuing error, but now when I try to browse the html file, the simulator loads and hangs... Here is the console output:

[Start BlackBerry MDS-CS] Starting BlackBerry MDS Connection Services...
[Start BlackBerry MDS-CS] DONE!
[Start Device Simulator] Launching Fledge: Launch file - C:\Program Files\Research In Motion\BlackBerry VS9 Plugin 1.2\handheld\simulator_4_6_0\fledge.exe, Parameters - /app=Jvm.dll /handheld=9000 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9000.xml /app-param=JvmDebugModeOff /session=9000 /app-param=MdsDebug: on /app-param=BrowserDebugPort:5557 /app-param=BrowserDebug: on /app-param=NoTutorial /keep-lcd-on /pin=0x2100001A /app-param=BrowserDebugPort:5557, Skin - BlackBerry 9000 (v4.6.0.212), PIN - 0x2100001A
[Start Device Simulator] Waiting for simulator to finish loading...

 


If I hit cancel, the following warning message is displayed:

"failed to get debug protocol"

Then, I must kill the app using Task Manager! If I leave the simulator up and hit the debug command in VS.Net, I'm able to run a debug session and other times it fails...

So far it I haven't got much sucess, as anybody ran into these issues before? Can someone point me in the right direction? Are there any logs files that could identify where it is failing?

 

 

 

Thanks & any help would be appreciated!

 


Installed VS.Net Product:

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

 

Installed Edition: Professional

Microsoft Visual Basic 2008   91605-130-0881902-60645
Microsoft Visual Basic 2008

Microsoft Visual C# 2008   91605-130-0881902-60645
Microsoft Visual C# 2008

Microsoft Visual C++ 2008   91605-130-0881902-60645
Microsoft Visual C++ 2008

Microsoft Visual Studio 2008 Tools for Office   91605-130-0881902-60645
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Web Developer 2008   91605-130-0881902-60645
Microsoft Visual Web Developer 2008

BlackBerry® Plug-in for Microsoft® Visual Studio®   1.2.0.31
BlackBerry® Plug-in for Microsoft® Visual Studio®

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi joelajean,

 

We had found that some environments had issues with MS Message Queue on installation.  In the Visual Studio Plug-in v2.0 (that is now available in beta) we removed the Message Queue requirements.

 

I would recommend uninstalling the v1.2 and installing the v2.0 beta that has addressed many of these issues. 

 

v2.0 can be found here:

http://na.blackberry.com/eng/developers/devbetasoftware/eclipseplugin.jsp

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 136
Registered: ‎01-25-2010
My Device: Z30, Z10, Q10, Dev Alpha B & Bold 9900
My Carrier: Bell

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi Tim,

 

I uninstalled v1.2 and re-installed v2.0. Now, when I launch the plug-in the "Message Queue" error is no longuer displaying but I still get the following :

The "Start BlackBerry Simulator" is left hanging...

[Start BlackBerry MDS-CS] Starting ...
[Start BlackBerry MDS-CS] DONE!
[Start Device Simulator] Launching Fledge: Launch file - C:\Program Files\Research In Motion\BlackBerry Widget Packager\simpack\fledge.exe, Parameters - /app=Jvm.dll /handheld=9500 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9500.xml /app-param=JvmDebugModeOff /session=9500 /app-param=MdsDebugSmiley Surprisedff /app-param=BrowserDebugPort:5557 /app-param=BrowserDebugSmiley Surprisedn /app-param=NoTutorial /JvmDisableBacklightTimeout /pin=0x2100001A /app-param=BrowserDebugPort:5557, Skin - Default BlackBerry Widget Simulator 9500 (Version 5.0.0.307), PIN - 0x2100001A
[Start Device Simulator] Waiting for simulator to finish loading...

... if I cancel out, I get the following warning message "Failed to launch fledge" and than the simulator loads but I have to kill the "RIM.Net.Tools.ScriptHost.exe" process using the Task Manager. Once it's killed, the VS.Net debugger seems to attache itself but the demo web site does not load in the simulator. I get the following error on the BB simulator: "Unable to connect to the selected Mobile Data Service, please try again later."

 

Installed Production running on XP

 

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Professional

Microsoft Visual Basic 2008   91605-130-0881902-60645
Microsoft Visual Basic 2008

Microsoft Visual C# 2008   91605-130-0881902-60645
Microsoft Visual C# 2008

Microsoft Visual C++ 2008   91605-130-0881902-60645
Microsoft Visual C++ 2008

Microsoft Visual Studio 2008 Tools for Office   91605-130-0881902-60645
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Web Developer 2008   91605-130-0881902-60645
Microsoft Visual Web Developer 2008

BlackBerry® Web Plug-in – Browser Development   2.0.0.10
BlackBerry® browser development is a one of two components in the BlackBerry® Web Plug-in

BlackBerry® Web Plug-in – Widget Development   2.0.0.10
BlackBerry® widget development is a one of two component in the BlackBerry® Web Plug-in

BlackBerry Development Advisor
Posts: 13
Registered: ‎01-14-2010
My Device: Bold 9700
My Carrier: Rogers

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi joelajean..

 

I was wondering if I could get some more information about your current environment from you.  If you could answer the following that would be wonderful.

 

 

  • Is your machine a laptop or PC and if you are working on a laptop do you normally work in a connected or disconnected mode from the network.   Or if you are on the network are you working over a wireless connection??
  • What OS are you currently running?  XP, Vista, Windows 7.0 (32/ 64bit)??
  • Are you working through any custom network settings??  Firewalls, proxies, etc??

 

Best Regards

===========================================================================
"Simplicity is the ultimate sophistication" - Leonardo Da Vinci

David Burgess
Team Lead, IDE Extensions Team
Research In Motion

Developer
Posts: 136
Registered: ‎01-25-2010
My Device: Z30, Z10, Q10, Dev Alpha B & Bold 9900
My Carrier: Bell

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

I'm running off a Laptop, on XP SP3. I'm on a connected Network... Our corporate network as Firewalls & proxies.

BlackBerry Development Advisor
Posts: 13
Registered: ‎01-14-2010
My Device: Bold 9700
My Carrier: Rogers

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi joelajean..

 

What I think you are seeing is actually two issues caused by the same thing.  Some sort of connection issue seems to be interfering in communication between the various components of the BlackBerry Web Plug-in. 

 

The first is the one that is causing the BlackBerry simulator to seem to go off into space and not display the web page on first run.  In this case Visual Studio is waiting for a call back message from from the BlackBerry Simulator that it's not getting.  When you reset the environment by cancelling the debug process and killing the scripthost and then rerunning.. it works the second time as Visual Studio detects the running BlackBerry Simulator.. (It doesn't wait for the callback)  

 

Another way of doing the above without going through the headache of killing the scripthost is to do the following:  

 

1) Browse to the following directory:  C:\Program Files\Research In Motion\BlackBerry Widget Packager\simpack

 

2) Run the following from a CMD prompt:  "fledge.exe /app=Jvm.dll /handheld=9500 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9500.xml /app-param=JvmDebugModeOff /session=9500 /app-param=MdsDebugSmiley Surprisedff /app-param=BrowserDebugPort:5557 /app-param=BrowserDebugSmiley Surprisedn /app-param=NoTutorial /JvmDisableBacklightTimeout"

 

3) This will start up the BlackBerry simulator manually.

 

4) From Visual Studio click to debug your demo website...  You will get a message stating "You have selected a different skin than the one being used by the currently running simulator.  Do you want to close the current simulator and start a new instance with the new skin 'Default BlackBerry Widget Simulator 9500 (Version 5.0.0.307)'?"  You can click No to this and it Visual Studio will use the already started simulator.  

 

The second issue I am still not too sure about.  It appears that there is another communication issue, this time between the BlackBerry Simulator and the MDS Simulator.  


Can you do the following... can you try debugging your demo website from a disconnected state??  Off the network I mean??  I would like to see if you what you are experiencing is being caused by a network problem. 

 

Thanks for your patience..


Best Regards


Dave

===========================================================================
"Simplicity is the ultimate sophistication" - Leonardo Da Vinci

David Burgess
Team Lead, IDE Extensions Team
Research In Motion

Developer
Posts: 136
Registered: ‎01-25-2010
My Device: Z30, Z10, Q10, Dev Alpha B & Bold 9900
My Carrier: Bell

Re: Problems loading BlackBerry 9000 simulator with VS.Net debug session

Hi Dave,

Well, I’m one step further than last week Smiley Happy !!!!

I tried the step above in a connected and disconnected environment and both test permits the Visual Studio debugger to attach itself to the simulator (Rim.NetTools.ScriptHost.exe).

If I run the VS.Net debugger without running the MDS Simulator I get the following error “Unable to connect to the selected Mobile Data Service, please try again later.”

Since the error was related to MDS, I figured that it needs the MDS Simulator running prior debugging… So I launched the MDS simulator, everything loads properly but I get an “HTTP Error 403: Forbidden” – “Not authorized to access localhost:80”

  1. I would assume the debugger would have launched the MDS simulator automatically, but I guess it as to be launched manually… Is this correct?

  2. My demo site runs locally off my local IIS server the default port 80. When I launch the local site in my IE or Firefox browser, it runs fine.  I’m assuming there is an MDS configuration that is not configured properly… but not certain which one.

    Since we have a proxy server to external internet, I added the following configurations to the rimpublic.property file found in the … BlackBerry Email and MDS Services Simulators 4.1.4\MDS\config directory

    application.handler.http.proxyEnabled = true
    application.handler.http.proxyHost=[proxy server]
    application.handler.http.proxyPort=[proxy port]

    With these settings, I can now access internet site (www.google.com) via the BB simulator.

  3. I’m a bit confused with the local web servers… VS.Net runs off local IIS for debugging purposes, but the MDS simulator runs on Tomcat, if I’m not mistaking… how are the http request routed? Which Web Servers handles my debugging session?


Thanks & your help is very well appreciated !

Joel