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.
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 the active solution is a mobile solution; in the background a special service is run as: localhost:8889
If the mobile solution is running, open in the Chrome browser to: localhost:8889. This will show a page to choose the client to debug (in case there are multiple clients running) or connect directly if only one present.
While in the debugger of Chrome, there are two tabs where you can inspect stuff:
Servoy Mobile applications can be debugged while running on actual devices like phones or tablets or in a desktop browser.
The debugger is a special instrumented version of the Google Chrome Developer Tools. This means that the Debugger inside Servoy Developer is not used and the Google Chrome is required to do debugging.
This feature is available as of Servoy 7.3.
To be able to debug a mobile solution, the solution needs to be exported and deployed in debug mode:
Note that solutions exported in debug mode require Servoy Developer to be running and accessible from the Mobile Client. When Servoy Developer is not available, the mobile solution will fail to launch.
Once the Mobile solution is deployed and running, the debugger can be opened in Google Chrome on the machine where Servoy Developer runs on localhost:8889. Depending if there are multiple mobile debug clients connected, the page will first offer a list of clients to debug or go straight to the debugger if there's only one debug client connected.
The UI of the debugger sports a range of tabs at the top of the screen. Of those only the following two are functional:
The other tabs are not functional at this point in time.
Breakpoints can be set by clicking in the gutter of the sourcefile and when hit, the tools in the right pane provide options to inspect code and to step through the code.
Note: If you are using Chrome version 36 or higher, you may need to set "Allow insecure WebSocket from https origin" in chrome://flags,
else the debugger won't start.
Changes The source files can also be pushed 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 the client is reloaded or the PhoneGap application is started again, 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!be edited and when saved the changes are simultaneously applied both in the running client as well as pushed into the workspace of Servoy Developer, so the changes are still applied after restarting either the debug client or Servoy Developer.