Visual Studio Debugging Help — not detecting execution of a function?
Visual Studio Debugging Help — not detecting execution of a function?
I'm building a simple dialog system for a 2D RPG in Unity with C#. I'm having trouble with a certain bug where the textbox loops itself in some cases.
Anyway, the point is: I have a function that enables the textbox object.
When I put a breakpoint next to that function call, it is not activated. This would make me think that this function is not called. However, when I comment that function call out, the textbox object is never enabled.
Why doesn't that breakpoint get activated? Clearly, the code is getting to the function call... right?
Are you compiling with debugging information enabled and optimizations off? Do breakpoints work in other parts of the code? Is the red breakpoint icon in the IDE filled or hollow?
– TypeIA
Sep 15 '18 at 18:38
Is Visual Studio actually attached to Unity?
– Retired Ninja
Sep 15 '18 at 18:49
@Retired Ninja Yes, other breakpoints work. I think optimizations was the issue thanks!
– jeepers mcface
Sep 15 '18 at 18:51
1 Answer
1
Had to turn off optimizations!
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
Turn off optimizations.
– Uwe Keim
Sep 15 '18 at 18:38