xcode - Problems debugging swift project - can't print any variable to the console while paused (exc_bad_access) -


for whatever reason project has started giving me problems printing variable when set breakpoint. consider following code:

if let index = hinttypesinuse.index(of: type) {     let indexpath = indexpath(item: 0, section: index + 1)     hinttypescollectionview?.reloaditems(at: [indexpath])     hinttypesinuse[type].addhint() } 

if set breakpoint on second line here, , try 'po hinttypesinuse' get:

error: execution interrupted, reason: exc_bad_access (code=1, address=0x1728c634e). process has been returned state before expression evaluation.

now hinttypesinuse accessible in code after point, , random example, goes in project. variables seem able access while debugging local variables within code block.

tried looking through build scheme see if there weird there, it's set debug mode, , compared blank new project , looks identical that.

why can't access non-local variables while debugging?

and of course restart of xcode , reboot took fix problem. 😆


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -