Tuesday, September 6, 2011
Developing Blackberry application using NetBeans Plugin - part 2, fixing debug issue
On my previous post, I reviewed the new blackberry Netbeans Plugin. Latre I found Shai also published his post about how to use the new plugin in developing the LWUIT blackberry application.
But I found the new plugin could not debug the blackberry application.
The reason is if you want to debug your blackberry application, you have to copy all the .debug files into the blackberry simulator folder, include xxx.debug, xxx-1.debug, xxx-2.debug, ... etc. From the generated build-impl.xml script file, we know that blackberry plugin only copied the xxx.debug file and missing all other debug files.
Add the following targets in the build.xml, which will override the same target in the build-impl.xml:
1. Update target blackberry-pre-debug, it will copy all the debug files into the simulator folder.
2. Update target clean-blackberry, it will delete all the files of the application in the simulator folder.
3. If you want to build BlackBerry CLDC application, you need to add the target create-cod:
The only difference with build MIDlet application is in <arg value="-cldc"/>, by default, the Blackberry plugin already choose MIDlet by using <arg value="-midlet"/>.