How do you debug Java Applets?

Aside from the obvious use of the Java console and the applet viewer, starting from Java 6 update 7, you can use the VisualVM that comes with the JDK (JDK_HOME/bin/visualvm). It allows you to view the stack traces of each thread and even view all object instances. AppletViewer is very handy, you can do a … Read more

Newlines in the Immediate Window

Actually there is a way. You can use format specifiers in the immediate window to change the format of the display. If you have a string with carriage returns and linefeeds in it (“\r\n”) you can follow the print request with the ‘no quotes’ format specifier. In the immediate window type: ?MyObj.ToString(),nq and the \r\n … Read more

How do I find the name of the calling function?

Here is a solution you can often use. It has the advantage of requiring no changes to the actual function code (no adding calls to stackwalk functions, changing parameters to pass in function names, or linking to extra libraries.). To get it working, you simply need to use a bit of preprocessor magic: Simple Example … Read more

iOS5 What does “Discarding message for event 0 because of too many unprocessed messages” mean?

This what Apple Technical Support says about this (after paying $49 for a Developer Tech Support Incident): These messages are coming from Core Location framework. The most likely cause of these messages is that there isn’t a run loop running on the thread on which the CLLocationManager was created. (This implies that the CLLocationManager wasn’t … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)