6. Development environment (C++/C#): Linux + Vislau Studio Code (remote)¶
Visual Studio Code 의 원격 개발 기능을 사용해서 MS Windows와 macOS 상에서 linux 서버를 연결하여 C++ 혹은 C# (mono) 를 사용해서 개발할 수 있습니다. IDE는 Windows 혹은 macOS에서 구동하고, 개발 관련된 파일들은 linux 서버 위에 저장하게 됩니다.
이 챕터에서는 Visual Studio Code 대신 VS Code로 축약해서 부르겠습니다.
You can develop game server on linux server remotely using Visual Studio Code and its remote development extension from your Windows environment or from your macOS environment.
I’ll call Visual Studio Code as VS Code, for brevity.
6.1. Starting a new project¶
If you have an existing project, please go to the next step.
Enter the following command in a command shell to begin a new project called my_project.
$ funapi_initiator my_project
Your new project is in a directory with ‘-source’ as a suffix. For example, the project above will be named my_project-source . The game development team can put this directory in an SVN or GIT repository to share it.
6.2. Create a VS Code environment¶
Run as follows:
$ my_project-source/setup_build_environment --type=vscode
Launch VS Code from Windows or macOS, and then connect to the linux server. You may refer to the official document for further details.
6.3. Build the project¶
After connecting the linux server, you can access the previously created my_project-source
directory from VS Code.
![_images/vscode-cpp-build.png](_images/vscode-cpp-build.png)
From Terminal menu, run “Run Build Task” to build the project.
The build configuration is located in the Build
task in the .vscode/task.json
file.
You may change the build configuration in the tasks.json
between debug/release.
Similarly, run “Packaging” task to create a package.
6.4. Debugging the project¶
6.4.1. C++ Project¶
![_images/vscode-cpp-debug.png](_images/vscode-cpp-debug.png)
After selecting the server type from the debug tab, you can start to debug your game server.
6.4.2. C# Project¶
![_images/vscode-mono-debug.png](_images/vscode-mono-debug.png)
After selecting the server type from the debug tab, you can start to debug your game server. Because it uses “Mono Soft Debugger”, it may take several seconds to deubg the game server.
6.4.3. Adding a new flavor¶
If you use the server flavors, you need to run following command after adding a new flavor. The command will add a debugging target for the newly added flavor.
$ my_project-source/setup_build_environment --type=vscode
Note
If you modify the files in the .vscode
directory,
you can find the backup copies in the same directory.