Debugging an Application
Without a doubt, your application will be exponentially more complicated than our Hello World demo. In fact, you might even (perish the thought) have some bugs. ThinWire has some obvious advantages over other frameworks when it comes to debugging. Open Hello.java and add the following line of code to the main method:
Application.current().getFrame().setX(10);
Don't worry about what this code does right now. All you need to know is that it will cause a RuntimeException to occur. Recompile the file and restart Tomcat. When you reload the application, you are presented with a MessageBox informing you that an exception has occurred. If you click the Show Details button, the MessageBox expands, and you are presented with a full stack trace. Another option is to use debugging tools built in to Java IDEs. Because ThinWire keeps all your application code in the Java space, using a standard debugger is a viable option. You can find a detailed tutorial on using Eclipse to debug ThinWire applications at thinwire.com.