Skip to Content

Oliver Kaluscha, a Business specialist and consultant at Acoma-Service Ltd. has gained some experience taking part in several large mobile projects in the last 5 years. Most customers he was working with use PDAs to run their mobile scenario. Before MI7.1 it is not really possible to debug the mobile project against this mobile device with just pressing a few buttons. Therefore Oliver has created this blog. It will show you how to debug the application with your MI installation. This includes the PDA Version, actual persistence, libraries and settings.

 

Really often a customer runs into a situation, where there is an error on the device and he has no idea where it comes from. If he tries to simulate this error on the PC  – well – most often everything works fine. And to trace into the PDA using LOG files and the persistence itself is often not very helpfull. With this approach it is absolutely easy to debug into not working devices and find the problem.

 

Best of all: This solution works with MI installations on PDA and PC. Furthermore it is not necessary to install MI or MDK on the local PC at all. Installed Eclipse, the source code of the project and JDK greater 1.4 is abolutely enough. Great for a job as a fireman while working on a customer site.

Unfortunately it will not help to find errors in the JavaSript coding of the page or why devices do not work together with the MI installation on the PDA. But this should give a place to start and digg into the problem.

 

Prerequisites: First of all stop the corrupt MI instance. The easiest way to stop MI on PDA is to remove the MI startlink from the windows/startup folder and SoftReboot the PDA. After that create a folder on your internal PC Harddrive called TestEnv. In there create a second folder where you will put the MI sources into. Name this folder with the username, the problem or the date when the error occured. This helps you to find the correct folder, if you want to debug into that problem again. Now copy all files form the MI folder of the corrupt device into that folder. You should have an exact copy of the MI installation from the corrupt device on your HardDisk now.

 

FolderStructure 

 

We do not need the device again – perhaps make a copy of this folder on your PC for later use – you worker can continue to work with it or you can reset the device completely.

 

Setup: Open Eclipse and open your project. In the project, use the LIBs from the folder you created above. This allows you to debug againt this particular device.

Debug: Now open the debug window. Create a new Debug project. Point it to your actual project and tick “Include external jars when searching for main class”. The Main class is: 

com.sap.ip.me.core.FrameworkInitializer

 

Main Debug Screen

 

Now change to the ARGUMENTS tab, and enter the following Arguments:

 

“-home:C:\TestEnv\MI_NULLPOINTER” -trace -url:MAM_30/start -app:jsp

 

Meaning of these parameters:

 

  • home:… points to the folder you created above.
  • url:…. woints to your start file inside your WEBAPPS folder above
  • app:… the runtime of the App, in this case it is JSP

Debug Arguments

 

If you press the DEBUG button, the copied MI instance starts form the folder you named above. It is using this persistence and settings of this device. This shows you 99% of the errors. I hope this little blog helps you to be more sucessfull in the future with your Mobile implementations.

 

Have fun with your mobile projects,

Oliver

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply