DZone.com
Follow
On-Device Debugging and JUnit 5
This post is a follow-up to a previous release post and covers changes that affect how you iterate on a Codename One app. The two main changes are on-device debugging and standard JUnit 5 against the JavaSE simulator. On-device debugging allows Java to be treated as Java on a real iPhone or Android device. Codename One has always supported on-device debugging, but with limitations, such as not being able to set a breakpoint in Java code and inspect Java fields. Previously, debugging an iOS app required a Mac and Xcode, as it was the only debugger that understood the binary. The translation step between Java and C code produced by ParparVM made it difficult to debug Java code on a device. The new on-device debugging feature allows for setting breakpoints in Java code and inspecting Java fields on a real device. This feature has been long-awaited and is a significant improvement for developers. The post focuses on explaining this new feature in detail, as it is the most complex and significant change. The ability to debug Java code directly on a device will greatly improve the development process for Codename One apps.