IT tutorials
 
Mobile
 

BlackBerry Java Application Development - Starting the debugger

6/7/2013 7:48:18 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
Debugging the application

We simply ran the application in the simulator and the debugger wasn't involved. Debugging an application is an essential part of the development process in order to find and fix bugs that are an inevitable part of the application development process. Eclipse provides a robust debugging environment with many tools to make it as easy as possible. You've already seen the simulator, which is also integrated into the debug process of Eclipse. With Eclipse and the BlackBerry simulator, you can simulate and debug your application very effectively.

So now, let's see these tools in action. What better way than to actually see a bug in the application. However, as this application is one of the samples and has already been debugged, you will have to introduce a bug to use.

Starting the debugger

  1. As we said before, the first step is to actually introduce a bug. This application is so simple that it was actually hard to decide how best to do this! Simple is always best though, so for this exercise let's add something that is obviously a bug. Passing a null value to the add method will work nicely for this purpose. Add the following code into the constructor of HelloWorldScreen at the end of the method, add(null);

    When you are done, it should look like this:

  2. The next step is to start debugging the application. On the toolbar is an icon with a bug-like image on it. You can also start debugging the application by clicking on the Run menu item on the Debug menu. Click on the Debug toolbar button to start debugging the application.

  3. When you use Eclipse to debug for the first time, you will see a dialog like the next one asking how you want to debug the application. This dialog is shown only the first time you start the debugger, but you can change it later if need be. We want to use the simulator, so select BlackBerry Simulator from the list and click on OK.

  4. At this point, the debug server is starting and the simulator is getting set up. This process takes a lot more time than just running the simulator by itself. It can take more than a minute to get all set. During this time, the simulator will display a wait screen like the one shown in the following screenshot and will not be usable.

  5. Once it is all set up, the simulator will be shown and look the same as it did before.

What just happened?

OK, so now we have the simulator actually running and debugging the HelloWorldDemo sample application. To get here we only had to do a couple of things.

After setting things up, we actually launched the simulator and debugger by clicking on the debug icon on the toolbar. You may have noticed that the toolbar icon has a small down arrow next to it. If you click on the arrow, a small menu will be displayed with additional debugging options such as those we also saw in the "Debug As" dialog. We aren't going to use them, so if you accidently click on the arrow, just click on the bug icon or click away to close the menu up.

Before an application can be debugged it must be compiled and built. Like most common IDEs, starting the debugger will automatically build the application if it needs to be done. We did change the code by introducing the bug, but otherwise there shouldn't be any errors so that this build should be quick and event free.


 
Others
 
- BlackBerry Java Application Development - Running an application in the simulator
- Windows Phone 7 : Silverlight User Interface Development - Designing for Windows Phone 7 (part 2) - Designer and Developer Mechanics
- Windows Phone 7 : Silverlight User Interface Development - Designing for Windows Phone 7 (part 1) - Design Approach, Design Resources
- Developing BlackBerry Tablet Applications : Working with the File System - SQLite Databases
- Developing BlackBerry Tablet Applications : File System Access (part 3) - File Browse for Multiple Files
- Developing BlackBerry Tablet Applications : File System Access (part 2) - File Browse for Single File
- Developing BlackBerry Tablet Applications : File System Access (part 1)
- iPhone Developer : Assembling Views and Animations - Managing Subviews - Tagging and Retrieving Views
- iPhone Developer : Assembling Views and Animations - Recovering a View Hierarchy Tree, Querying Subviews
- Java ME on Symbian OS : Handling Diversity - Handling Screen and Display Diversity
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us