In this article

In this article

Walkthrough: Setting Up Remote Debugging on the Macintosh

Silverlight remote debugging on the Macintosh consists of the following pieces:

An add-on to Visual Studio 2008 that provides Silverlight remote debugging as a transport option. This is installed as part of the Silverlight Tools for Visual Studio 2010.

A proxy service that runs on the Macintosh and helps the remote debugger identify the local processes running Silverlight applications. This is installed as part of the Silverlight developer runtime for the Macintosh.

Remote debugging occurs over an SSL-encrypted TCP channel between the debugger and the target computer. Initial configuration must be performed on both the Macintosh computer and the computer running Windows in order to set up the TCP port and private/public key pair.

The following walkthrough describes how to configure your computers for debugging and to start a debugging session in Visual Studio.

In the Encryption Password text box, specify an 8-to-25-character password and then duplicate it in the Verify Password text box.

In the Replicator Path text box, specify a path and .exe file name for the PC configuration, or accept the default value.

Click the Generate PC Configuration button.

A dialog box will confirm the creation of the PC configuration .exe file at the location you specified in step 4. You can use this file with any computer running Windows that you want to use to debug Silverlight on the Macintosh computer. You can also re-generate this file as needed by running the Silverlight Debugging Configuration application again and following this procedure starting with step 4.

The Macintosh computer is now configured for remote debugging. Next, you will use the generated .exe file to configure the computer running Windows.

To configure the computer running Windows

Close any open instances of Visual Studio.

Copy the .exe file created in the previous procedure to your computer running Windows.

Run the .exe file.

Enter the password you specified in the previous procedure.

Click OK in the dialog box that indicates that the Windows configuration has completed successfully.

The computer running Windows is now configured for remote debugging. Next, you will establish a connection between the two computers in order to begin debugging.

To connect the Visual Studio debugger to a Silverlight-based application running on your Macintosh

On your Macintosh computer, start the Silverlight-based application that you want to debug.

On your computer running Windows, use Visual Studio to open the Silverlight project that corresponds to the application that is running on your Macintosh computer.

In the Qualifier combo box, specify the fully-qualified domain name or IP address of your Macintosh computer.

The Available Processes window displays a list of processes running on your Macintosh.

Select your Silverlight-based application process. You can use the Type column to identify the Silverlight processes.

Click Attach.

The Visual Studio debugger is now attached to the target process on the Macintosh. At this point, you can use Visual Studio to perform normal debugger tasks, such as setting breakpoints, stepping through code, and examining the call stack.

At some point, you might want to undo the configuration that you have just performed. For example, you might need to upgrade the configuration for the next release of Silverlight. The following procedure describes how to undo the previous procedures.

To remove the Macintosh debugging configuration

On the computer running Windows, open a command prompt and then run the following command: