Debugging Smartfox on MAC/intelliJ

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
levancho
Posts: 71
Joined: 27 Jun 2011, 16:03

Debugging Smartfox on MAC/intelliJ

Postby levancho » 07 Jul 2012, 09:59

Hi,

I see that in my Mac version of smart fox there is no sfs2x-standalone.vmoptions

so where should I put my debug info for JVM?
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Debugging Smartfox on MAC/intelliJ

Postby Lapo » 09 Jul 2012, 18:16

You should use the sfs2x.sh script to launch the server and modify it.
In any case you can alter the JVM parameters directly from the AdminTool, did you know that? ;) Just launch the tool and choose ServerSettings, then click on the JVM Settings tab.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
shanti
Posts: 45
Joined: 19 Jul 2011, 10:19

Re: Debugging Smartfox on MAC/intelliJ

Postby shanti » 26 Jul 2012, 13:50

Hi Lapo,
we are using sfs2x 2.1.0v running on Redhat linux. and trying to connect from windows 64bit eclipse editor.

we modified the sfs2x.sh file and added the jvm debug into it

Code: Select all

"JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=9933,server=y,suspend=n"
"


now when i connect through eclipse editor it is giving below error -
eclipse -
failed to connect to remote VM
and in the mmo log we see below error

Code: Select all

 WARN  [SocketReader] binary.BinaryIoHandler     - Incoming request size too large: 1146572845, Current limit: 8000000, From: { Id: 1, Type: DEFAULT, Logged: No, IP: 192.168.0.179:30148 }


what settings need to be done in order to debug sfs2x server.

just for ref. after adding debug option our sfs2x.sh file looks as below -

Code: Select all

# Use -Dlog4j.debug for Log4J startup debugging info
# Use -Xms512M -Xmx512M to start with 512MB of heap memory. Set size according to your needs.
# Use -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled for PermGen GC

#-Xdebug -Xrunjdwp:transport=dt_socket,address=9933,server=y  suspend=y -jar stockTradingGUI.jar

JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=9933,server=y,suspend=n"

JRE_FOLDER="../jre/bin"
JAVA_CMD="java"
if [ -d "$JRE_FOLDER" ]; then
    JAVA_CMD="../jre/bin/java"
fi

CPATH="./:lib/*:lib/Jetty/*:extensions/__lib__/*"
${JAVA_CMD} -cp ${CPATH} -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2


Thank you
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Debugging Smartfox on MAC/intelliJ

Postby Lapo » 26 Jul 2012, 16:14

Well, the problem is that you are trying to use as the debug port the SFS2X default port (TCP 9933). This way Eclipse will not "speak" to the debugger, instead it will talk to SFS2X which won't understand that protocol. And additionally it is refusing the data because it's a too large packet.

Please change the debugging port.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 144 guests