Using the JDE with a Device
This page provides instructions on setting up your JDE environment and BlackBerry device to enable you to view and track the methods and objects with your app running on a device.
Profiling Differences on the Device and Simulator
The JDE provides all of the same profiling views while attached to a device, as it does while attached to a simulator. There are some differences you should be aware of:
- Profile View
- Only CPU profiling is allowed. Profiling for number/size of objects created and number/size of objects committed is not supported
- CPU usage is determined by sampling the JVM at certain intervals. You can choose Accurate samples or just regular samples. Accurate samples occur on a 10ms interval. The interval time is not stated for regular samples.
- Objects View
- It will take several seconds for objects to load. On average, it can be anywhere from 15-45s.
Setting up the OS
- Ensure that you have a device simulator that matches the model and OS version of the device you'll be using. The OS versions must match exactly. You can download a simulator here
. - Run the latest JDE and navigate to Edit -> Preferences. Then open the Simulator tab. Choose the simulator that matches your device from the "Profile" drop down box. If you don't see the matching simulator, add it to the JDE by doing the following:
- Navigate to the simulator directory and copy the "SimPackage-x.x.x.rc" file
- Navigate to the JDE\bin directory and paste the "SimPackage-x.x.x.rc" file
- Restart the JDE
If you were to attach the debugger to your device at this point, you would be able to view and track all of the RIM methods being called and you would be able to see RIM defined objects being created.
Setting up your application
- In your metovaMobilePlugin.xml file, make sure that mode is set to "release" and that you are building to the simulator you have specified in the JDE.
- In your project POM, add the following lines:
<properties> <release.profiling.enabled>true</release.profiling.enabled> </properties> - Clean the simulator by running the clean.bat file found in the simulator directory.
- Install your project (mvn install or mvn install pom)
- When the build is complete, install the build to your testing device using the SD card or the Desktop Manager.
- Reboot the device as necessary.
Attaching the Device to the JDE
- Connect your device to your desktop using the USB cable.
- In the JDE, navigate to Debug -> Attach to -> Handheld and select your device in the list.
- You should see a white screen on your device that says "Attaching Debugger" which should disappear after a few seconds.
- You should see a white screen on your device that says "Attaching Debugger" which should disappear after a few seconds.
Be sure to check the output console at this point. If you see statements saying "No debug information found for myApp.cod", you will not be able to view and track the methods/objects from that cod. It's ok if there are some of these statements for other 3rd party app cods or even for some of the RIM cods that are not part of the core OS, but if any of your application's cods are listed you might not have completed the setup properly.
At this point, you should be ready to start using the JDE to view and track methods and objects from your app.
