Running locally
We know that we can easily run Azure websites locally while we're developing them because they're normal websites and will run in IIS and IIS Express without any difficulty. Cloud services aren't normal executables, which can run on Windows, but they can be run locally on the Windows Azure compute emulator and storage emulator. We have a full and express emulator available to us in the SDK; we'll start with the default express version and look at the full version when we need it later.
To get started, put some break points in the application in the OnStart
and Run
methods, one at the start and one inside the while
loop. Run the debugger in Visual Studio and we'll see a progress dialog that notifies us of the compute emulator, storage emulator, and worker role initialization progress:
Once this is completed, the worker role should break on the OnStart
method, and we notice that we have a new Windows icon in the system tray; if we right-click on it, we have a number of options...