Hi All,
I have tried to debugging with help of view topics,but I noticed that there is SFSPro we can use bebugging but we can not use SFS2x.So please help me out of this.I need to debug my sever side code i.e java through the eclipse by using Smartfoxserver2x version not SmartfoxserverPro.
Regards,
Gopala Susurla
How to debug server side java extension by using Eclipse
-
- Posts: 31
- Joined: 15 May 2011, 16:09
- Contact:
How to debug server side java extension by using Eclipse
GopalaSusurla
Checkout http://docs2x.smartfoxserver.com/GettingStarted/howtos#item6.
In eclipse simply use "Remote Java Application" in the "Debug Configurations" dialog and setup your remote app to use the port you have configured in the extra debug parameters in your sfs2x.bat.
In eclipse simply use "Remote Java Application" in the "Debug Configurations" dialog and setup your remote app to use the port you have configured in the extra debug parameters in your sfs2x.bat.
-
- Posts: 31
- Joined: 15 May 2011, 16:09
- Contact:
HI Mka
Hi Mka,
Thanks for given support.But I need to debugging through my Eclipse.Is there any chance to debugging while application running.Please help me this.
Regards,
Gopala
Thanks for given support.But I need to debugging through my Eclipse.Is there any chance to debugging while application running.Please help me this.
Regards,
Gopala
GopalaSusurla
What I have described does exactly what you want. You start smartfox with the extra debug parameters, then register it in eclipse as remote java app. Then you can put breakpoints into your code within eclipse and see what happens.
You might also need to go into the Source tab in the remote app debug config and add your projects.
I've been doing it and it worked for me
You might also need to go into the Source tab in the remote app debug config and add your projects.
I've been doing it and it worked for me
-
- Posts: 31
- Joined: 15 May 2011, 16:09
- Contact:
Connection problem
Hi MKA,
When I connected my java extension code into debugging I got "Failed to connect to remote VM. Connection timed out.org.eclipse.jdi.TimeoutException" this exception.Please let me know step by step what u did.
When I connected my java extension code into debugging I got "Failed to connect to remote VM. Connection timed out.org.eclipse.jdi.TimeoutException" this exception.Please let me know step by step what u did.
GopalaSusurla
Make sure the port you configure as debug parameter on smartfox matches the port you configure in your remote app in eclipse.
Eclipse uses port 8000 as default. The example uses 8787. So you either have to set eclipse to 8787 or smartfox to 8000. Also the host in eclipse needs to match the host you are running smartfox on.
Eclipse uses port 8000 as default. The example uses 8787. So you either have to set eclipse to 8787 or smartfox to 8000. Also the host in eclipse needs to match the host you are running smartfox on.
-
- Posts: 31
- Joined: 15 May 2011, 16:09
- Contact:
Problem when I run debug mode
Hi MKA,
Again I faced problem when I run my remote apps through debug mode.
"Failed to connect to remote VM
com.sun.jdi.connect.spi.ClosedConnectionException".
Please make me help for this
Regards,
Gopala
Again I faced problem when I run my remote apps through debug mode.
"Failed to connect to remote VM
com.sun.jdi.connect.spi.ClosedConnectionException".
Please make me help for this
Regards,
Gopala
GopalaSusurla
Hi Gopala,
I just encountered same issue but I fixed it thanks to MKA.
So, just try to create another ".bat" script (for example: sfs2x-debug.bat) where you can have the following:
@java -cp "./;lib/*;lib/Jetty/*;extensions/__lib__/*" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2 $3
Then, run "sfs2x-debug.bat" instead of SFS running standalone or "by service".
In the end, simply setting on Eclipse -> Debug Configurations -> Remote Java Application of: Project (the one you are working), SFS IP machine (as host) and 8787 (as port) should be fixing that.
I just encountered same issue but I fixed it thanks to MKA.
So, just try to create another ".bat" script (for example: sfs2x-debug.bat) where you can have the following:
@java -cp "./;lib/*;lib/Jetty/*;extensions/__lib__/*" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2 $3
Then, run "sfs2x-debug.bat" instead of SFS running standalone or "by service".
In the end, simply setting on Eclipse -> Debug Configurations -> Remote Java Application of: Project (the one you are working), SFS IP machine (as host) and 8787 (as port) should be fixing that.
-
- Posts: 31
- Joined: 15 May 2011, 16:09
- Contact:
-
- Posts: 10
- Joined: 11 Jul 2011, 20:58
Hi. Please update to SFS2x RC3, that's the latest one
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Who is online
Users browsing this forum: Google [Bot] and 132 guests