Its actually really easy!
This one has been tested on Win Xp in Eclipse. I Have no idea if it works on any other system. This is also for debugging on you local machine. That is to say You run the server on the same PC as you run Eclipse on.
The basic idea is that you run smartfox as a service but with a consolewindow (to get the System.out.println();)
-------------------------------------------------------------------
C:\Program\SmartFoxServerPRO\ is my rootfolder for smartfox
in C:\Program\SmartFoxServerPRO\Server\conf\wrapper.conf
you got some lines saying
# Java Additional Parameters
wrapper.java.additional.1=-Dfile.encoding=UTF-8
wrapper.java.additional.2=-Djava.util.logging.config.file=logging.properties
Directly after that add theese lines
# runtimedebug
wrapper.java.additional.3=-Xdebug
wrapper.java.additional.4=-Xnoagent
wrapper.java.additional.5=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
Now make a .bat-file (jsu rightclick in a folder -> click new -> textdocument -> name the textdocument to e.g. "smarfoxService.bat")
copy this line and change the paths so it points at your wrapper.exe
Code: Select all
C:\Program\SmartFoxServerPRO\Server\wrapper.exe -c "C:\Program\SmartFoxServerPRO\Server\conf\wrapper.conf"
Run the .bat by just dubbelclicking it!
Now its time to set up Eclipse!
Click the green "bug"-icon (up to the left in eclipse)
select "Remote Java Application"
click new
Insert this:
ConnectionType: Standard (Socket Attach)
Connection Properties:
Host: localhost
Port: 8787
Click "Debug"
Done!
Hope this will make someones day easier! Post a reply if you dont get it to wor and i'll try to help