godotengine / godotengine/godot-docs

Documenting Setup a VSCode project for your own modules

Open
#8,268 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

### Godot version

4.dev

### System information

Windows 10

### Issue description

I did not quickly find a good description of how to set up a VSCode project to support a good workflow to edit and release a Module.
So I would like to mention this somewhere for prosperity.
If anyone needs a similar setup or anyone is updating the documentation of
[custom_modules_in_cpp](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html)
[introduction_to_the_buildsystem](https://docs.godotengine.org/en/stable/contributing/development/compiling/introduction_to_the_buildsystem.html#custom-modules)

### Steps to reproduce

Create a project folder.
Clone Godot repository
Clone your modules repository
Add a .vscode folder
Resulting in something like the following folder structure
- Project
- .vscode
- tasks.json
- godot
- .git
- my-modules-repo
- .git
- modules
- titamf (this is the actual module folder one-word)

Open the project folder using VSCode and write the tasks.json

``` json
{
"version": "2.0.0",
"tasks": [
{
"label": "build godot",
"group": "build",
"type": "shell",
"command": "scons",
"options": {
"cwd": "${workspaceFolder}\\godot",
},
"args": [
"dev_build=yes",
"debug_symbols=yes"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-godot-for-my-repo",
"group": "build",
"type": "shell",
"command": "scons ",
"options": {
"cwd": "${workspaceFolder}\\godot",
},
"args": [
"dev_build=yes",
"debug_symbols=yes",
"custom_modules=${workspaceFolder}\\my-modules-repo\\modules"
],
"problemMatcher": "$msCompile"
}
]
}
```
press ctrl + shift+ b
Select the build you want to use.

This results in 2 completely separate git-repos while being able to edit everything in one VSCode project.

### Minimal reproduction project

N-A

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.