View Array contents in Qt Creator debugger

前端 未结 5 1904
傲寒
傲寒 2021-01-08 01:25

I am using Qt on Ubuntu. When I debug I only see the very first value of the array in Locals and Watchers. How can I view all the array contents?

struct node         


        
5条回答
  •  既然无缘
    2021-01-08 01:50

    In Qt for mac what worked for me was:

    1. Add an expression evaluator for the desired variable (right click the variable on the debugger window then "Add expression evaluator for "var name here""

    enter image description here

    1. The array variable appears initially as a single value. Just change "var" to "var[start...end] and the array values appear.

    enter image description here

    enter image description here

提交回复
热议问题