{"id":96,"date":"2014-12-23T12:16:14","date_gmt":"2014-12-23T12:16:14","guid":{"rendered":"http:\/\/smartfoxserver.com\/blog\/?p=96"},"modified":"2022-07-07T08:03:10","modified_gmt":"2022-07-07T08:03:10","slug":"how-to-debug-your-extensions","status":"publish","type":"post","link":"https:\/\/smartfoxserver.com\/blog\/how-to-debug-your-extensions\/","title":{"rendered":"How to debug your Extensions"},"content":{"rendered":"<p>You can easily attach a Remote Debugger to the server and enable your favorite Debugger for bug hunting in your Extensions.<\/p>\n<p>SmartFoxServer 2X can be started with the <strong>sfs2x.bat<\/strong> (Windows) or <strong>sfs2x.sh<\/strong> (Linux\/Unix\/MacOSX) scripts. By adding some JVM switches to the launch script you can enable remote debugging. You can do it by following these steps:<!--more--><\/p>\n<ul>\n<li>open the AdminTool&#8217;s <strong>Server Configurator<\/strong> module and go to the <a href=\"http:\/\/docs2x.smartfoxserver.com\/GettingStarted\/admintool-ServerConfigurator#jvmsettings\">JVM settings<\/a> tab;<\/li>\n<li>add the following switches to the <em>JVM options<\/em> list:<br \/>\n-Xdebug<br \/>\n-Xnoagent<br \/>\n-Xrunjdwp:transport=dt_socket,address=0.0.0.0:8787,server=y,suspend=n<\/li>\n<li>submit the changes and restart SmartFoxServer: now you will be able to start a remote debugging session.<\/li>\n<\/ul>\n<p>If you want to keep the script allowing debug separate from the standard start script, simply duplicate the start script and modify it by adding the above switches using a text editor. Then save the script as<em> debug.sh<\/em> or <em>debug.bat<\/em> and launch it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can easily attach a Remote Debugger to the server and enable your favorite Debugger for bug hunting in your Extensions. SmartFoxServer 2X can be started with the sfs2x.bat (Windows) or sfs2x.sh (Linux\/Unix\/MacOSX) scripts. By adding some JVM switches to the launch script you can enable remote debugging. You can do it by following these [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/96"}],"collection":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":4,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":2246,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions\/2246"}],"wp:attachment":[{"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartfoxserver.com\/blog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}