Skip to content
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

Debugger stops working in the main thread when creating additional threads #42901

Open
MikeSchulze opened this issue Oct 19, 2020 · 11 comments
Open

Comments

@MikeSchulze
Copy link

Godot version:
Godot Engine v3.2.3.stable.mono.official

OS/device including version:
windows 10 x64

Issue description:
The debuger/breakpoints are not working anymore in the main thread when i create and run an additional thread.
I run a scene and set two breakpoints. One before the thread is created and started and one after it.
The first breakpoint works as expected, the debuger holds on this breakpoint and show the current program state
image

Continue the debuger, the second breakpoint is not reached the old debug info is still shown.
image
The second print statement is also never executed (if removing the breakpoint it is shown)

The debuger panel shows like is holding on a breakpoint.
You can press step next or continue but nothing happens.
Removing the second breakpoint during the debug session also not helps.
The debuger is in an invalid state and unuseable.

Steps to reproduce:
Use the attached project and run the scene.

Minimal reproduction project:
debug_main_thread.zip

@fire fire changed the title Debuger is stop working in main thread when creating additonal thread Debugger stops working in main thread when creating additional threads Oct 19, 2020
@fire fire changed the title Debugger stops working in main thread when creating additional threads Debugger stops working in the main thread when creating additional threads Oct 19, 2020
@MikeSchulze
Copy link
Author

Hello, don't want to pressure;) But this is a critical error as it makes debugging impossible.
Any idea when this will be fixed? 3.2.4 ?

@akien-mga
Copy link
Member

Related to (if not duplicate of) #2446. I guess you can infer from that bug how early you can expect a fix ;)
More seriously, in this specific case both breakpoints are on the main thread so it might be fixable more easily than implemented multithreaded debugging.

@MikeSchulze
Copy link
Author

Thanks for that fast answer 👍

@MikeSchulze
Copy link
Author

hi any update here?

@Calinou
Copy link
Member

Calinou commented Jan 10, 2021

hi any update here?

Nobody knows how to resolve this, so I wouldn't hold my breath for it.

@MikeSchulze
Copy link
Author

But that's bad news. The manual polling thread is my workaround to keep the client connection alive if the _process takes too long. Would be really nice if you look at the debug vs. thread in general. That blocks a lot if you can't debug properly; (

@MikeSchulze
Copy link
Author

hi any update here?

@Calinou
Copy link
Member

Calinou commented May 9, 2021

hi any update here?

Implementing multi-threaded debugging isn't on the roadmap for 4.0, so it'll happen for 4.1 at best (unless a contributor manages to figure it out, which isn't easy).

@MikeSchulze
Copy link
Author

@Calinou i ask not about multi-threaded debugging. Whats it is about main thread debuging ?
It is still broken when a run a new thread.
This is a main feature of Godot and must be fixed in 3.3 too!

@Calinou
Copy link
Member

Calinou commented May 10, 2021

i ask not about multi-threaded debugging. Whats it is about main thread debuging ?

These issues are closely related, because you are starting new Threads in a script.

This is a main feature of Godot and must be fixed in 3.3 too!

With the new release policy, 3.3.x will not receive fixes that require large code changes with risk for regressions – that's for 3.4 and later.

@MikeSchulze
Copy link
Author

hm so i have to wait ;)
Thanks for response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants