Skip to content

How to debug in PonySDK ?

Nicolas Velin edited this page Jan 16, 2018 · 1 revision

By default, PonySDK works in Production mode. So you will have minimal logs, minified js, ...

There are various possibilities to debug in PonySDK.

Debug Mode

Using Debug mode in PonySDK facilitates your usage of PonySDK.

You will be able to use :

  • Plain Javascript files
  • Debug ID on HTML elements : com.ponysdk.core.ui.basic.PWidget.ensureDebugId(String)
  • ...

To do so, you have just to set to true the debugMode variable of your instance of the com.ponysdk.core.server.application.ApplicationManagerOption

For example, if you are using Spring to instantiate your PonySDK web server :

<bean name="applicationManagerOption" class="com.ponysdk.core.server.application.ApplicationManagerOption">
    <property name="debugMode" value="true" />
</bean>

Super Dev Mode

Using Super Dev in PonySDK facilates your own modification of PonySDK.

You will be able to :

  • Debug terminal Java code directly in Chrome Web tools

For using it, you have to compile and launch runCodeServer

$ gradlew jar
$ gradlew runCodeServer

When the server is ready, you will have a log in the console like this

The code server is ready at http://127.0.0.1:9876/

Go on this web page and follow the instructions

Clone this wiki locally