Remote debug cloud Images

Using Remote Pharo IDE you can control your Images remotely.


To use this feature install the PharmIDE first:

Metacello new
        smalltalkhubUser: 'Pharo' project: 'PharmIDE';
        configuration: 'PharmIDE';
        version: #stable;
        load: #(Server Client)

Install PharoCloud API library:

Metacello new
        smalltalkhubUser: 'mikefilonov' project: 'EphemericCloudAPI';
        configuration: 'EphemericCloudAPI';
        version: #stable;

Publish a copy of the current image to the ephemeric cloud:

|client eph|
client := EphemericCloudClient userID: '' authToken: ''.
(client publishSelfAs: 'debug image')
    ifTrue: [ "Start a remote IDE instance in the cloud copy"
  		PrmRemoteUIManager registerOnPort: 40423.       
    ifFalse: [ "Original instance"
			"configure debug port of the instance"
			eph := client lastPublishedInstance.
			eph debugPort: 40423.
			eph inspect. "open inspect window with the host"
			eph isRunning: true.
			(Delay forSeconds: 10) wait. "give some time for IDE to startup"
			eph remote openPlayground. "open remote playground"

You should see two windows opened for you:

  1. inspector with the hostname of the published ephemeric,
  2. remote playground with access to the image.

Now you can execute Smalltalk expressions on your published Image. For instance, if you execute ZnServer startOn: 8080 you will start a default Zinc HTTP server in the cloud and you will be able to connect to your ephemeric instance via web-browser.