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

Is there a way to debug unbalanced ImGUI calls? Expecting IM_ASSERT_USER_ERROR but instead get silence #452

Open
FireFox2000000 opened this issue Nov 30, 2023 · 3 comments

Comments

@FireFox2000000
Copy link

Hello, I'm currently investigating ways to debug and/or prevent user errors for my project. Currently any api balancing errors are just silently ignored, I'm wondering if there's tools from the C# side of things to debug these kinds of user errors?
Currently I'm using the library in a Unity project and so if there is automatic error handling it currently appears to be unable to be caught by Unity's debugger. Well, that is unless I make such a bad api call that Unity outright crashes instead.
I see on the main repo that there's supposed to be a IM_ASSERT_USER_ERROR check on the C++ side however I'm not sure if that is or even can be forwarded back to the C# side.
Would appreciate any tips or advice regarding this matter!

@sonoro1234
Copy link

Compiling in debug mode is necessary for imgui asserts.

@zaafar
Copy link
Collaborator

zaafar commented Nov 30, 2023

I once had to do the debugging, it was a painful experience. That is expected since there are 3 libs in 3 different languages that we are debugging.

I wrote my debugging experience in the readme ( url below ), please try it out and feel free to create PR to improve the debugging experience.

https://github.com/ImGuiNET/ImGui.NET#debugging-native-code

Other than that, I have also used render doc, pretty awesome tool and works flawlessly out of box.

@sonoro1234
Copy link

Compiling in debug mode is necessary for imgui asserts.

No need to debug at all, program will assert when compiled in debug mode.

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

No branches or pull requests

3 participants