Eclipse debug debugging smartfoxserver Java extension support

Source: Internet
Author: User

1. First, let's configure a file, SFS/Server/CONF/wrapper. conf.

Find these lines of code,

# Java additional parameters

Wrapper. java. additional.1 =-Server

Wrapper. java. additional.2 =-dfile. Encoding = UTF-8

Wrapper. java. additional.3 =-djava. util. Logging. config. File = logging. Properties

Add the following code after the Code:

# Runtimedebug

Wrapper. java. additional.4 =-xdebug

Wrapper. java. additional.5 =-xnoagent

Wrapper. java. additional.5 =-xrunjdwp: Transport = dt_socket, address = 8787, Server = Y, suspend = N

Save and exit.

 

2. Create a deubg batch file that can start smartfoxserver (that is, create a batch file ).

The name is SFs. bat. The content is as follows:

D:/developments/smartfoxserverpro_1.6.6/Server/wrapper.exe-c "D:/developments/smartfoxserverpro_1.6.6/Server/CONF/wrapper. conf"

Save and exit. The path is modified according to the installed directory.

 

3. Next, let's configure debug in eclipse. Open debug configurations, double-click Remote Java application, and fill in the following information in the column on the right:

Name: You can select

Project: Specify the Java Extension Project to debug smartfoxserver.

Connection Type: Standard (socket attach)

HOST: 127.0.0.1 server address. (If the server is local, enter the local address .)

Port: 8787 this is the port number specified in the wrapper. conf file above.

Click Apply.

 

Note that you must first start the server and then start the debugging just created under debug in eclipse. Call your as code again to call the Java extension or modify the server's own example to call the Java extension. When you call a Java extension, your eclipse will be triggered to enter the debugging interface.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.