Console.log in Java extension?
Greetings,
When "developing" javascripts within RTC, I find the console.log method to be very handy. What is the best "printf" method of debugging I can use from within an extension? I have a working Operation Advisor, but am now adding functionality to it and a piece is not working properly and I'd rather just use prints than debugging with Jetty at this point.
Thanks!
Accepted answer
One other answer
Comments
I use System.out.println and watch the server console (windows command prompt).
funny, I'd rather debug than watch the print output.
I'd rather debug than watch print out, too...but I've never developed anything in Java before and I didn't bother to get debugging working since it wasn't trivial. I am certain I will get to that point soon though! But I got my first extension (Operation Advisor) working nicely: An owner can't approve their own work items.
I just start my normal server in debug mode. then connect from Eclipse to a Remote app.
debug both client and server at the same time. only case where I can't do this is when I develop a jazz client side plugin, ten I need to start another eclipse locally in debug mode.
just add one line to the server.startup.bat as the last JAVA_OPTS line
set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3388
then the remote app port is 3388