Step by Step SFSx2 extension debugging
Hi just went through this process and thought i'd post it to make it easy for everyone, coz there are a few errors in the posts i've read.
I'm using eclipse IDE for java developers 3.6.1, and sfs2x server is running on my local machine, on windows xp
backup the bat file at
install folder/SFS2X/sfs2x.bat
edit the file with notepad and replace what's there with
@java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y -cp "./;lib/*;lib/Jetty/*;extensions/__lib__/*" -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2 $3
go to eclipse
run/debug configurations...
right click Remote Java Application and choose Add...
make sure the connection properties are set to
host: localhost
Port: 8787
double click the bat file you edited.
the cmd window should appear and say
Listening for transport dt_socket at address 8787
press the little green bug in eclipse to start the debugging session ( i found i had to click the little arrow next to it and select my extension name)
when you start the debugging session the SFSx2 server should start as normal
set some breakpoints in your extension code.
and enjoy.
