Debuggin SFS2x
Debuggin SFS2x
I'm not getting how te debug a java extension, you need to create a .bat or smt, but this closes immediality.
i'm using netbeans ide 7.0.1
Any help with screenshots possible?
i'm using netbeans ide 7.0.1
Any help with screenshots possible?
Did you see this?
http://docs2x.smartfoxserver.com/Gettin ... wtos#item6
http://docs2x.smartfoxserver.com/Gettin ... wtos#item6
Hi,
I followed the instructions, I added the commands to my batch script and changed susped to "y". The server waits for the debugger (I use eclipse -> Remote Java Application on port 8787), and when I start the debugger via eclipse, the server continues booting.
Still the debugging does not work, breakpoints are ignored, etc. Any idea what I could be doing wrong?
Thanks
I followed the instructions, I added the commands to my batch script and changed susped to "y". The server waits for the debugger (I use eclipse -> Remote Java Application on port 8787), and when I start the debugger via eclipse, the server continues booting.
Still the debugging does not work, breakpoints are ignored, etc. Any idea what I could be doing wrong?
Thanks
Re:
This link doesn't work.Lapo wrote:Did you see this?
http://docs2x.smartfoxserver.com/Gettin ... wtos#item6
Re: Debuggin SFS2x
This is a very old thread, created in 2011.
Since then we have reorganized the docs in several iterations. What you're looking for is here:
https://smartfoxserver.com/blog/how-to- ... xtensions/
Hope it helps
Since then we have reorganized the docs in several iterations. What you're looking for is here:
https://smartfoxserver.com/blog/how-to- ... xtensions/
Hope it helps
Re: Debuggin SFS2x
Have done all as described (https://smartfoxserver.com/blog/how-to- ... xtensions/).
Unfortunately I cannot catch the breakpoints
They are skipped.
What I'm doing wrong?
Debug in Netbeans runs well (not stops), Unity runs well (all fuctions work), breakpoints in Visual Studio work, but breakpoints in Netbeans are ignored.
What ideas?
Unfortunately I cannot catch the breakpoints
They are skipped.
What I'm doing wrong?
Debug in Netbeans runs well (not stops), Unity runs well (all fuctions work), breakpoints in Visual Studio work, but breakpoints in Netbeans are ignored.
What ideas?
Re: Debuggin SFS2x
Does the debugger connect successfully to the remote process?
Thanks
Thanks
Re: Debuggin SFS2x
1. Stop SFS service and start sfs2x.batLapo wrote:Does the debugger connect successfully to the remote process?
Netbeans:
2. Click "Debug / Attach debugger..."
3. Choose "Java Debugger (JPDA)" and "Ok". Tried all options - no effect.
4. Debug still running.
5. Breakpoints don't work.
Re: Debuggin SFS2x
Ok, but I am still not sure whether or not your Netbeans is actually connected to the server.
If you switch to the debug view, can you see the active threads, for example? If so the debug session is active which is a good sign. Also there should be a window showing the active breakpoints.
Unfortunately I am not a NetBeans expert as I've used Eclipse for most of the SFS2X work, but they should work very similarly.
Thanks
If you switch to the debug view, can you see the active threads, for example? If so the debug session is active which is a good sign. Also there should be a window showing the active breakpoints.
Unfortunately I am not a NetBeans expert as I've used Eclipse for most of the SFS2X work, but they should work very similarly.
Thanks
Re: Debuggin SFS2x
Thanks Lapo,
I've found some errors in SFS log and I'll investigate this issues... Hope it will help me
I've found some errors in SFS log and I'll investigate this issues... Hope it will help me
Re: Debuggin SFS2x
Do I understand correct that method init() starts first when extension runs?
Will be catched breakpoint at
lac = new LoginAssistantComponent(this);
?
Will be catched breakpoint at
lac = new LoginAssistantComponent(this);
?
Code: Select all
public class LoginController extends SFSExtension{
private LoginAssistantComponent lac;
private final Logger log = LoggerFactory.getLogger(LoginController.class);
@Override
public void init() {
if (log.isDebugEnabled())
log.debug("This message will show only if in DEBUG mode.");
lac = new LoginAssistantComponent(this);
lac.getConfig().loginTable = "users";
lac.getConfig().passwordField = "pword";
lac.getConfig().userNameField = "login";Re: Debuggin SFS2x
The init() method is called when the Extension is started.
If the Ext. is attached to a Zone it will be called when the server is booting up, as each Zone and relative Extension is loaded.
If it's a Room Ext it will be called when the Room is created.
Hope it helps
If the Ext. is attached to a Zone it will be called when the server is booting up, as each Zone and relative Extension is loaded.
If it's a Room Ext it will be called when the Room is created.
Hope it helps
Re: Debuggin SFS2x
Code in Ext called successfuly (user is created, e-mail is sent e.t.c.) but I cannot catch process at breakpoints.
In the Netbeans I see the running threads.
Thanks for help.
Will think again.
In the Netbeans I see the running threads.
Thanks for help.
Will think again.