Can variable changes be written?

I am using Unreal Engine 4 and there is a bug where the mouse is not limited to the window.

I am trying to debug the position of the mouse, but I am not sure how.

Every time I set a breakpoint at the mouse position, visual studio pauses the application, it is very difficult to debug it because there are so many pauses.

I am wondering if it is possible to write variable changes? For example, set a custom breakpoint on a variable and visual studio will pause the application very briefly, look at the variable, and put the value in a list.

I could just log the position of the mouse, but I want to make sure I don't have time to use the log.

+3


source to share


1 answer


This can be done using the "When Breakpoint is Hit" window. Set a breakpoint, right-click it and select "When hit ..."

enter image description here



In this window, select the "Print message" and "Continue execution" check boxes. Then update the line you want to print to add the values ​​you want to print (variable values ​​and expressions must be wrapped in {} to be interpreted as such. The "Continue Execution" setting makes the debugger not broken into a line, instead it will just log in and continue The messages are printed in the Debug β†’ Output window at runtime.

enter image description here

+4


source







All Articles