From b29b6118cfbb379406f47e249a3b5293bb172fe7 Mon Sep 17 00:00:00 2001 From: Sven Teigler <58704291+greenpixels@users.noreply.github.com> Date: Sat, 6 Dec 2025 20:45:52 +0100 Subject: [PATCH 1/5] Revise VSC debugging setup instructions Updated the debugging documentation for VS Code as the prior configurations was outdated --- src/toolchain/debugging.md | 43 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/src/toolchain/debugging.md b/src/toolchain/debugging.md index d8b45a8..1a8b682 100644 --- a/src/toolchain/debugging.md +++ b/src/toolchain/debugging.md @@ -17,32 +17,41 @@ you will only have symbols for stack frames in Rust code. ## Launching with VS Code -Here is an example launch configuration for Visual Studio Code. Launch configurations should be added to `./.vscode/launch.json`, relative +Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in `./.vscode/launch.json` and `./.vscode/tasks.json` respectively, relative to your project's root. This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. -```json +```jsonc +// ./.vscode/launch.json { "configurations": [ { "name": "Debug Project (Godot 4)", - "type": "lldb", // type provided by CodeLLDB extension + "type": "lldb", "request": "launch", - "preLaunchTask": "rust: cargo build", - "cwd": "${workspaceFolder}", + "cwd": "${workspaceFolder}/godot", + "preLaunchTask": "build-rust", "args": [ - "-e", // run editor (remove this to launch the scene directly) - "-w", // windowed mode + "-w" ], - "linux": { - "program": "/usr/local/bin/godot4", - }, - "windows": { - "program": "C:\\Program Files\\Godot\\Godot_v4.1.X.exe", - }, - "osx": { - // NOTE: on macOS the Godot.app needs to be manually re-signed - // to enable debugging (see below) - "program": "/Applications/Godot.app/Contents/MacOS/Godot", + "program": "PATH/TO/GODOT" + } + ] +} +``` + +```jsonc +// ./.vscode/tasks.json +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build-rust", + "command": "cargo", + "args": [ + "build" + ], + "options": { + "cwd": "${workspaceFolder}/rust" } } ] From ee92fca78ddde8dcc6e5dce6960bb62bf4879645 Mon Sep 17 00:00:00 2001 From: Sven Teigler <58704291+greenpixels@users.noreply.github.com> Date: Sat, 6 Dec 2025 20:56:04 +0100 Subject: [PATCH 2/5] fix(lint): shorten line character count --- src/toolchain/debugging.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/toolchain/debugging.md b/src/toolchain/debugging.md index 1a8b682..8cbd156 100644 --- a/src/toolchain/debugging.md +++ b/src/toolchain/debugging.md @@ -17,8 +17,10 @@ you will only have symbols for stack frames in Rust code. ## Launching with VS Code -Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in `./.vscode/launch.json` and `./.vscode/tasks.json` respectively, relative -to your project's root. This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. +Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in`./.vscode/launch.json` and +`./.vscode/tasks.json` respectively, relative to your project's root. + +This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. ```jsonc // ./.vscode/launch.json From 6b4789eff50e473d32560a5e7b857437460c7606 Mon Sep 17 00:00:00 2001 From: Sven Teigler <58704291+greenpixels@users.noreply.github.com> Date: Sat, 6 Dec 2025 20:57:09 +0100 Subject: [PATCH 3/5] Remove trailing space --- src/toolchain/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolchain/debugging.md b/src/toolchain/debugging.md index 8cbd156..62b9dbd 100644 --- a/src/toolchain/debugging.md +++ b/src/toolchain/debugging.md @@ -17,7 +17,7 @@ you will only have symbols for stack frames in Rust code. ## Launching with VS Code -Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in`./.vscode/launch.json` and +Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in`./.vscode/launch.json` and `./.vscode/tasks.json` respectively, relative to your project's root. This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. From 9cee81adaa1171655387cbf5e9f9588ac1362dca Mon Sep 17 00:00:00 2001 From: Sven Teigler <58704291+greenpixels@users.noreply.github.com> Date: Mon, 8 Dec 2025 21:37:30 +0100 Subject: [PATCH 4/5] Add back deleted comments and set syntax to json instead of jsonc --- src/toolchain/debugging.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/toolchain/debugging.md b/src/toolchain/debugging.md index 62b9dbd..dbe525a 100644 --- a/src/toolchain/debugging.md +++ b/src/toolchain/debugging.md @@ -22,18 +22,18 @@ Here is an example debugger setup for Visual Studio Code. Launch configurations This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. -```jsonc +```json // ./.vscode/launch.json { "configurations": [ { "name": "Debug Project (Godot 4)", - "type": "lldb", + "type": "lldb", // type provided by CodeLLDB extension "request": "launch", "cwd": "${workspaceFolder}/godot", "preLaunchTask": "build-rust", "args": [ - "-w" + "-w" // windowed mode ], "program": "PATH/TO/GODOT" } @@ -41,7 +41,7 @@ This example assumes you have the [CodeLLDB] extension installed, which is commo } ``` -```jsonc +```json // ./.vscode/tasks.json { "version": "2.0.0", From 03463662765a7f4c4ab45c38a2ff2bddf3dda269 Mon Sep 17 00:00:00 2001 From: Sven Teigler <58704291+greenpixels@users.noreply.github.com> Date: Sat, 6 Dec 2025 20:45:52 +0100 Subject: [PATCH 5/5] Revise VSC debugging setup instructions --- src/toolchain/debugging.md | 43 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/toolchain/debugging.md b/src/toolchain/debugging.md index d8b45a8..dbe525a 100644 --- a/src/toolchain/debugging.md +++ b/src/toolchain/debugging.md @@ -17,32 +17,43 @@ you will only have symbols for stack frames in Rust code. ## Launching with VS Code -Here is an example launch configuration for Visual Studio Code. Launch configurations should be added to `./.vscode/launch.json`, relative -to your project's root. This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. +Here is an example debugger setup for Visual Studio Code. Launch configurations and tasks should be placed in`./.vscode/launch.json` and +`./.vscode/tasks.json` respectively, relative to your project's root. + +This example assumes you have the [CodeLLDB] extension installed, which is common for Rust development. ```json +// ./.vscode/launch.json { "configurations": [ { "name": "Debug Project (Godot 4)", "type": "lldb", // type provided by CodeLLDB extension "request": "launch", - "preLaunchTask": "rust: cargo build", - "cwd": "${workspaceFolder}", + "cwd": "${workspaceFolder}/godot", + "preLaunchTask": "build-rust", + "args": [ + "-w" // windowed mode + ], + "program": "PATH/TO/GODOT" + } + ] +} +``` + +```json +// ./.vscode/tasks.json +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build-rust", + "command": "cargo", "args": [ - "-e", // run editor (remove this to launch the scene directly) - "-w", // windowed mode + "build" ], - "linux": { - "program": "/usr/local/bin/godot4", - }, - "windows": { - "program": "C:\\Program Files\\Godot\\Godot_v4.1.X.exe", - }, - "osx": { - // NOTE: on macOS the Godot.app needs to be manually re-signed - // to enable debugging (see below) - "program": "/Applications/Godot.app/Contents/MacOS/Godot", + "options": { + "cwd": "${workspaceFolder}/rust" } } ]