godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

Using vscode can't debug the extension in windows c++

Open whiletrue111 opened this issue 1 year ago • 1 comments
trafficstars

Godot version

4.2.1

godot-cpp version

4.2

System information

windows 10 i5

Issue description

can't hit break point no matter what i do using vccode and visual studio 2022 Project working and running but can't hit breakpoints

Steps to reproduce

i will give the vscode example in windows 10 ( following this tutorial : https://www.youtube.com/watch?v=8WSIMTJWCBk&ab_channel=FinePointCGI )

Godot Version

4.2.1

Question

Hello all using 4.2.1 stable for windows in vc code i set up the project every thing is working fine and i able to execute the scene from vccode . problem is i can't hit the breakpoint when trying to debug using godot-cpp 4.2 branch , and Godot 4.2.1 stable this is my vccode configurations

{   
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lldb",
            "request": "launch",
            "preLaunchTask": "build",
            "name": "Debug",            
            "program": "c:\\dev\\my\\godot\\Godot_v4.2.1-stable_win64.exe\\Godot_v4.2.1-stable_win64_console.exe",
            "args": ["--path","c:\\dev\\my\\godot\\godotcpp\\test4\\demo"],
            "cwd": "${workspaceFolder}"
        }
    ]
}
{
     
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "scons.exe -j4  target=template_debug  debug_symbols=yes ",
        }
    ]
}

scones command : scons.exe -j4 target=template_debug debug_symbols=yes image

run

what im missing here ?

Minimal reproduction project

test4.zip

whiletrue111 avatar Apr 05 '24 09:04 whiletrue111

It is because you are launching the console version of Godot Godot_v4.2.1-stable_win64_console.exe. This executable is just calling Godot_v4.2.1-stable_win64.exe. If you want the debugging to work, you have to launch Godot_v4.2.1-stable_win64.exe in your launch.json.

Tetane avatar Apr 08 '24 09:04 Tetane

I'm going to close this, assuming the last comment is correct about the cause of this issue. If not, please let me know, and we can re-open it

dsnopek avatar Jan 21 '25 17:01 dsnopek