-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance .vscode
folder for complete configuration to develop and debug the extension
#50
Comments
@ozzr Hey, thanks for giving out this info. Do you want to open a PR? Also, do you think the debugging functionality could be added without changing the |
Hi, sorry for the delayed response. The only way to debug the extension code is by forcing the engine to load a debug build of the extension by modifing temporarily the path to the "template_debug" library. What is needed is de .pdb file generated with the dev_build flag so the vscode debugger can find the code in our extension. The other builds do not inlcude it and I havent find a way to explicitly tell the engine to load de dev_build version of the engine Also it could be nice to modify the {
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/godot-cpp/gen/include",
"${workspaceFolder}/etxtension/src"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22000.0",
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
|
Maybe we could write the .gdextension file on every build so the user dont have to do it manually. Maybe doing it from the same SCons script? and create a task like "Generate Poduction Builds" and "Create DEV build" |
Hey, sorry @ozzr for the late answer as well. Your proposal sounds very interesting. However, does this mean that the changes will be only compatible with Windows or also with the other desktop platforms? About the different tasks for production and dev builds: Yes👍🏻 sounds good. Not sure though if we should meddle with the generation of the .gdextension file... this would mostly confuse users since it's more complicated to change the system to their needs then. |
the changes should be compatible with other platforms too. It would only requires to update the corresponding paths to follow specific OS notation. In the case of the .gdextension file we could just tell about it in the main page README so the user knows that it can be done, but then it has to be done manually |
Okay, sounds good to me 👍🏻 |
Bump :) @ozzr Would you still like to add a PR for this? I'd appreciate it immensely since I won't have that much time to work on this |
Sorry, I will do it today |
Done, please check the pull request. |
@ozzr I think it's important that the information is on the README. There is no hurry with it so take your time if you need👍🏻 I appreciate your contribution |
Ok, I will update the readme and restart the pull request |
I'm using a macbook now. vscode reports an error: console infomation: How should I deal with it, thank you my launch.json: |
Hi, try creating a task using the VScode command and see how it is organized, maybe, the task should look different in MacOs |
To debug the extension either from the godot editor or launching the demo project, it is important to
dev_build
library to test with this can be done just by adding the code below to thetask.json
:launch.json
file in the.vscode
folder in the root folder.gdextension
file to find the dev library while developing it. The code below is an example of how I do it for my upcoming terrain extension:windows.debug.x86_64 = "bin/libgd.landscape.windows.template_debug.dev.x86_64.dll"
With this we get to properly test and debug the code
The text was updated successfully, but these errors were encountered: