Playground not displaying output

Am using Xcode 6 on old MacBook Pro and trying playground with swift - find that the output I expect is not being displayed on the right hand side Anyone else see this?

Replies

For Xcode 6, if nothing is being output, you might want to see if there's a syntax error preventing compilation and execution.


For Xcode 7, make sure you've opened the debug area vs the assistant

I have this problem, too. No output in playgrounds.


The right bar, where it should be, is empty. I'm running Xcode 7 Beta on an old MacBook with OS X 10.10.3. I've tried everything I could find online about this. No luck.

When you create a brand new Playground, does the default "Hello, playground" show up in the results bar on the right?

No, the right column is blank when creating a new playground, too.


I just updated to the 10.11 beta, and the issue is the same there.


After sitting for about ten minutes, an error popped up:


"Error running playground.

Failed to launch iOS stub for playground execution:

error: no process found with ID 3436."


I recall a similar error in 10.10.3.

Check the console output. If this is an Xcode 6 playground, show the assitant editor to see the console output. There may be an error there.


Also, please post your playground code - it's very difficult to guess what might be wrong without seeing it.

I'm using Apple's tutorial playground:

https://developer.apple.com/sample-code/swift/downloads/Start-Dev-iOS-Apps-01.zip


Also, it happens if I just make a new playground with nothing in it (except the initial state). So it's not a question of bad code.


Matt

This is going to sound ridiculous but please bear with me. First, try typing "Hello" at the start of your playground. This checks to see if the playground is operational. If it does not echo to the results sidebar, try quitting and restarting Xcode. If you're still not seeing any success, you can try looking at the activity monitor and selectively killing/relaunching items with dt.Xcode, com.apple.CoreSimulator.CoreSimulatorService, etc.


The best solution however is simply to reboot and start with a new playground.

Xcode 7 beta 2 has been released. It doesn't specifically mention a fix for people with this problem of not getting results in playgrounds, but there may have been some underlying fixes that help.


https://developer.apple.com/xcode/downloads/


If any of you are still having this problem, is it just w/ iOS playgrounds? Do OS X playgrounds work correctly?

Still have this problem with the Playground, only difference is that the only output is a warning that the playground have not been able to find the Souces Folder


dyld: warning: could not load inserted library '/var/folders/3v/19_tyvk91l7_x9dkrx2xll140000gn/T/com.apple.dt.Xcode.pg/auxiliarymodules/DCB16DFC-2D1D-433D-A4E7-6401B2D83756/Toolbox_Sources.framework/Toolbox_Sources' because image not found

Playground execution failed: /var/folders/3v/19_tyvk91l7_x9dkrx2xll140000gn/T/./lldb/5291/playground3.swift:1:8: error: no such module 'Toolbox_Sources'

import Toolbox_Sources

I ran into an issue where the output wasn't visible on 10.11 beta 4 and the solution ended up being this:

Go to xcode preferences then location and change the command line tools to xcode 7. I had both 6 and 7 beta installed and both were installed correctly in my Applications folder however on one of my Mac's the command line tool didn't automatically switch to xcode 7. Took me two hours to figure this out as I was thinking it was a server issue or something.


Edit: Part of my error that I was receiving prior to my fix stated:

Failed to launch iOS stub for playground execution: lost connection.

I had the same problem.


OS X 10.11 (El Capitan).

Xcode 7.1


ericahad it right above on June 17, 2015. Running the "GuidedTour" playground with the new version of Xcode (7.1) revealed many errors in the code, and text displaying in neither the Results View nor the console.


At erica's suggestion I fixed the errors I could (mostly syntax changes associated with this new version. e.g., println => print) and commented out the errors I couldn't. I then quit Xcode, then re-launched the GuidedTour playground. et, voila! Results View began displaying results, and the console also revealed this error:



Playground execution failed: /var/folders/q_/pkl06z_91zl5t3wz0j0mb7jw0000gn/T/./lldb/7563/playground39.swift:61:1: error: switch must be exhaustive, consider adding a default clause

}


The console had not been displaying anything prior to now.


The playground had a switch statement with the default case commented out. I removed the commenting and the console error cleared whoile the Results View text continued to display.


All good now!


Many thanks to erica and this forum!

I m still getting the endless "running MyPlayground"... xcode 7.3b El Capitan.


I have both the beta and the 7.2.1 on the same machine. I know it shouldnt be a problem but really dont know what is going on.

Anyone any ideas?

I tried a couple of things, the only thing that did work on my old MacBook Pro was to delete the default comment in the Playground and wait 2-3 seconds. You can even paste the comment back in again and it will still work. No idea why Apple doesn't fix this. Seems to be a minor bug.

Thanks Erica,


That did the trick nicely 🙂

try this tip http://stackoverflow.com/a/40114541/7082042