Child pages
  • Debugging Mobile
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Since Servoy 7.3 we started to utilize the standard Google Chrome debug protocol 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.

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

Usage

If the mobile solution is running, open in the chrome browser to: localhost:8889. This will show a 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 console tab where you can see the console output the client generates or 
  • the sources tab where you can start debugging your actual code that is running in the mobile client, 
    • The navigator (the arrow button on the left) gives you access to all the sources.
    • 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. But these changes are pushed and reflected in the workspace of the Servoy developer to be used in next run!

 

  • No labels