How do you debug custom module in exported version of project?
Asked Answered
A

2

0

Hello, i have a custom module which works if i run my game in godot editor, i built custom export templates via:

scons target=template_debug dev_build=yes
scons target=template_release dev_build=yes

Then i used these templates during export so my custom module can work in exported version of project, but it does not work in game, no crashes, it just works like i did not write custom module

So, how do you debug exported windows version of project in Visual Studio? When i try to debug from godot editor, then everything works fine, i can even attach to process, but i can't attach to exported version, it says: the breakpoint will not currently be hit

Apothecary answered 16/10, 2023 at 13:49 Comment(0)
S
0

Are you able to debug other parts? If you put a break somewhere in core, will it hit that, or does it warn you about that as well? Are you sure that you're using the custom export template you built when you export from godot? Sorry I don't have any answers for you, just trying to think of possible problem points.

Shingle answered 17/10, 2023 at 3:37 Comment(0)
A
0

Shingle After opening this discussion i continued to look for the cause of error without debugger and it turns out my custom module config.py had:

can_build(env, ...)
  return env.editor_build

I changed from env.editor_build to True and it started to work as expected

After finding cause of error i totally forgot about this discussion and forgot to check if debugger works now, after your reply i checked debugger and it works in exported project too

Apothecary answered 17/10, 2023 at 7:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.