Given the absence of debug support for Java (which amazes me, since it has a debug interface already defined), I tried to use jdb. So I go to the bash window, and type “jdb”. It tells me the debugger is initializing, and I get the jdb prompt. So I type
stop in HelloWorld.main
but at that point, the entire text of the simple HelloWorld.java file disappears, and the file appears to be empty. But if I exit the tab, and re-open the shared workspace, and the source code is there. But once I’ve set the breakpoint, and try to run, I get the error that HelloWorld.main cannot be found, which is not surprising because the source file contents are gone. If I repeat closing the tab and reopening the shared workspace, the source comes back.
I have no idea why this is happening, although having native debugging support would obviate the need to run some other debugger.
Is there a recommended debugger to use? I have always programmed in Eclipse, so I have never needed to use any other debugger because it has built-in debug support.