2025-04-09 7:58 AM
I'm trying to debug my UART debug code. I suspect that I have calculated the Baud rate incorrectly.
I run the code in debug & I'm trying to view the value in `what_baud` but the debugger isn't having it, see below.
How do I do this correctly?
Solved! Go to Solution.
2025-04-10 6:44 AM
It was a context issue, I can see it when I'm stepping through the function where it exists.
2025-04-09 8:10 AM
Probably your what_baud variable has been optimised-out - hence:
You could try making it volatile
Or just watch the whole expression.
2025-04-10 6:44 AM
It was a context issue, I can see it when I'm stepping through the function where it exists.
2025-04-10 6:46 AM
@NicRoberts wrote:I can see it when I'm stepping through the function where it exists.
Of course - the whole point of local variables is that they do not exist outside their function!