Child pages
  • Debugging Mobile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Since Servoy 7.3 uses we started to utilize the standard Google Chrome debug protocol to setup a debugger for a mobile application. to debug a mobile applications.

This allows to debug a Servoy mobile client on an actual device such a phone or tablet or debug another browser(tab) running a mobile client.

Startup

For this to work, the mobile client needs to be exported in debug mode, this must be done by using the mobile export (Export Soluton->Mobile Export) and then enable the "Export in debug mode" checkbox. If that

When the mobile solution is then executed on a mobile or in the desktop browser, it will talk back to the developerServoy Developer. This talk back communication is enabled if you have /had a mobile solution enabled as active solution in the developer once. The developer will then startup Servoy developer, in the background a special service underis run as: localhost:8889.

Usage

If the mobile solution is running, then you can open in the chrome browser that same urltolocalhost:8889. That This will open directly show a the mobile solution in the debugger, or will present you with 2 or more tabs if you have multiply tabs or instances of the mobile solution open. Then you need to select the right tab or close a few old tabs first.In the debugger tab page to choose the a client to debug (in case you have multiple running) or connect directly if only one present.

While in the debugger of chrome you have a few tabs where you can inspect stuff, like:

  • the Resources tab to see the loaded or stored resources, 
  • the console tab where you can see the console output the client generates

...

  • or 
  • the scripting tab where you can start debugging your actual code that is running in the mobile client, 
  • the navigator to all the sources are in the navigator (the arrow button on the left). 

Under localhost:8080 section you will find the same scripts you also have in the developer. You can open them to set breakpoints, these will now be hit when you hit that code in the mobile client.

Hot code replace

You can also push changes right to the running client by making changes directly in the chrome browser and save those changes. This will push the changes to the mobile client and that code will be executed in the next run. If you reload the client or start the phonegap application again then these changes will be lost. The changes you do here are reflected right away in the workspace of the developer.

...