New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-4776] For "po" command debugger doesn't shows errors in better case and falls down in worse case #4633
Comments
@swift-ci create |
Comment by Jim Ingham (JIRA) Dratini is a library. With Swift debugging, how a library is included into your application is often important, especially when you are having issues where "nothing is working". So I really need to see an example of how you are using this library that shows the problems you are reporting here. Also, if you could along with the example include some explicit steps to get to a point where I can see the problem, that would help me get to the point where I can see and fix it. |
Comment by Vyachaslav (JIRA) It seems the problem is in Objective-C you can debug mutable and immutable variables and can't various constants. But in swift there is no difference between constant and just immutable variable defined with "let". So maybe debugger in swift treat all the "var" variables as mutable/immutable variables in Objective-C and all the "let" variables as constants (even if it is not correct). So the only temporary solution I see is to forget about immutable variables in swift (use "let" keyword as less as possible) You even don't need to test Dratini - try this example and run "po test" after the last line (or check its value with another debugger tool): let test = ["1": "1", "2": "2", "3": "3"] |
Comment by Jim Ingham (JIRA) I actually don't see po failing for any of the variables as I step through the source above. I'm not sure what you mean "after the last line", however. If I step to the test2["1"] = "one" line above, I can print & po test2. If I step over that line then I end up out of the artificial function made to hold swift top-level statements, and back in the system "_start" function, which has no variables. |
Comment by Vyachaslav (JIRA) man do you troll me? |
Environment
OSX 10.12, xCode 8.3.2
Additional Detail from JIRA
md5: 11f5a2ba8456bd508c14d013f84b09de
Issue Description:
I imported this project:
https://github.com/kevin0571/Dratini
just try to debug sending of any request and log inputparams or outputparams info - debugger shows that these custom objects contain nil values and falls down when you try to output them via "po" command.
In the same time print("(some_object)") for these objects works well as expected.
Also this problem is described here:
http://stackoverflow.com/questions/19870176/xcode-debugger-doesnt-print-objects-and-shows-nil-when-they-arent
but in my case nothing from theses advices works
The text was updated successfully, but these errors were encountered: