Here I am: past midnight, and debugging why my Kinetis ARM Cortex-M4 K60N512 application. So now you know what keeps me up at night :-). Stepping through some code which is using all kind of strings:
The challenge is: how to debug my strings?
In the Variables View I see my string variables ‘strCmd’ and ‘strHelp’:
But what is behind the pointer? I wish the ‘Value‘ column would show me this. Instead, the value shows the address of the first character. Not what I want. Clicking on the triangle gives me the first character. And only the first character:
Useful, but not what I need. I need more, more characters. There is a context menu which is promising:
It asks me where to start and how many characters to display:
Ok, now this is better:
But this is not that simple as it should be. To do this for every sting? To much work. There has to be a much simpler way?
And actually, there is. It was there, but I missed it the first time! All what I have to do is to click on the variable name, and it shows in the Details Pane of the Variables View:
That Details Pane is really powerful: it even shows me the function name behind a function pointer :-):
For strings, it shows non-printable characters as well, very nice:
While this was cool, there is even a simpler and easier way: the trick is to move the mouse cursor over a variable in the source, and voilà: it will show the string for it :-):
Happy Stringing 🙂
Pingback: Eclipse Debugging with Strings – Part 2 | MCU on Eclipse
Pingback: Variable Debugging with Eclipse Kepler | MCU on Eclipse
Pingback: Eclipse Debugging with Pointers and Arrays | MCU on Eclipse