How to view value of Swift “let” constant in Xcode 6 debugger

后端 未结 1 1845
迷失自我
迷失自我 2021-01-03 02:02

When I\'m stopped in the debugger in Xcode 6, how can I view the value of a local Swift constant declared with let?

If I create a brand new Swift pr

相关标签:
1条回答
  • 2021-01-03 03:01

    This was a bug in Xcode which I can confirm was fixed in Xcode 6.1. (Thanks, Steve Rosenberg.)

    This is what I get now, as expected:

    screenshot of console; p, po, and fr v now all display the value of someConstant in some way or another

    The constant is now displayed correctly in the variables view as well, and is no longer listed twice:

    screenshot of variables view; someVariable shows 6 and someConstant shows 5

    0 讨论(0)
提交回复
热议问题