Unable to use debugger/lldb in UI Test target when test target uses Swift 2.3
| Originator: | krze | ||
| Number: | rdar://28371098 | Date Originated: | 09/19/2016 |
| Status: | Open | Resolved: | No |
| Product: | Xcode | Product Version: | 8.0 (8A218a) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: If you have an XCTest UI test target in your project, and you have set the test's target's build setting "Use Legacy Swift Language Version" to "Yes", you are unable to view objects' values in the debugger. You are also unable to use lldb without encountering an error. Steps to Reproduce: 1. Unzip and open the attached project in Xcode 8.0 (8A218a) 2. Proceed to XCTest_UI_Test_DebuggerUITests.swift 3. Ensure there is a breakpoint set in testExample() line 34, so it will be caught in the debugger 4. Start the UI tests 5. Wait for the breakpoint to be activated 6. Once you hit the breakpoint, observe the variabes "self" and "foo" in the left-hand pane of the debugger 7. Attempt to use the lldb command line tool, for example, try the command "po print(foo)" Expected Results: You are able to view the variables' values in the left-hand pane of the debugger. In the console on the right-hand pane, you are able to use lldb without error (i.e. the command "po print(foo)" will return "bar") Actual Results: You cannot view the values of the variables in the left-hand pane of the debugger, you can only see their names. When you attempt to use po, you encounter this error: warning: Swift error in module XCTest-UI-Test-DebuggerUITests. Debug info from this module will be unavailable in the debugger. error: in auto-import: failed to get module 'XCTest_UI_Test_DebuggerUITests' from AST context Version: Xcode 8.0 (8A218a) OS X El Capitan 10.11.6 Notes: This doesn't seem to affect unit test targets, nor app targets using Swift 2.3 Configuration: This only occurs while using Swift 2.3, aka "Legacy Swift Language Version" in the target's build settings.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!