# Debugging Objects The ArchestrA Object Toolkit allows you to attach the Visual Studio debugger to the Application Server processes running your object’s code. This allows you to troubleshoot and debug your objects. In order to use the debugging features, you must use the object on a computer that has Visual Studio installed. > **Caution** > Never debug objects on a production system. Always use a development node with a local Galaxy for debugging. > **Caution** > Never ship an object that was created from a debug build. These objects may require debug modules and may not function correctly in a production environment. There are two ways for attaching the debugger: - If you have already created a build with the required PDB files and instantiated or deployed the object on the local system, you can attach the debugger to the Application Server processes running the current object version and debug that version. - If you’ve made changes to your object and want to debug the new version, you can attach the debugger as part of the build process and then debug the new version. ## Attaching the Debugger to the Processes Running the Current Object Version If you want to debug the current version of an object that you have already instantiated or deployed on the local system, you can attach the debugger to the Application Server processes running the current object version. There are two prerequisites for this: - You must have created the required PDB (Program Database) files as part of the current build. - Visual Studio must be able to find the PDB files. If necessary, set up the search paths in Visual Studio accordingly. For help on these points, refer to the Visual Studio documentation. **To attach the debugger to the processes running the current object version** 1. In the ArchestrA Object Toolkit toolbar, click the **Debug** icon. The **Debug** dialog box appears. 2. Select one or more of the following check boxes: - **Attach IDE Debugger** to debug custom editor code - **Attach Configuration Debugger** to debug config time code - **Attach Runtime Debugger** to debug run time code 1. Click **OK**. Visual Studio switches into debugging mode. You can now work with your object and use the debugging features as required. 2. To stop debugging, click the **Debug** icon in the ArchestrA Object Toolkit toolbar again. ## Attaching the Debugger during the Build Process If you’ve made changes to your object and want to debug the new version, you can attach the debugger as part of the build process and then debug the new version. **To attach the debugger during the build process** 1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears with the **Build** category selected. 2. Select one or more of the following check boxes: - **Attach IDE Debugger** to debug custom editor code - **Attach Configuration Debugger** to debug config time code - **Attach Runtime Debugger** to debug run time code 1. Click **OK**. 2. In the ArchestrA Object Toolkit toolbar, select a build mode in the **Mode** list. For example, to debug config time or custom editor code, **Build & Inst** is convenient. 3. Click the **Build** icon to launch the build. Once the build is finished, Visual Studio switches into debugging mode. You can now work with your object and use the debugging features as required. 4. To stop debugging, click the highlighted **Debug** icon in the ArchestrA Object Toolkit toolbar.