Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Framework debug article with info and links to the out-of-proc designer for .NET #1693

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ When you create a custom control, you will often find it necessary to debug its

You can debug your custom controls using Visual Studio, just as you would debug any other .NET Framework classes. The difference is that you will debug a separate instance of Visual Studio that is running your custom control's code.

> [!IMPORTANT]
> This article is primarily intended for the classic In-Process Designer for Windows Forms with .NET Framework. The procedures may not be directly applicable or fully compatible with projects that target .NET (not .NET Framework).
>
> For .NET Framework projects, only projects that can compile with the platform target settings _Any_ or _x64_ are fully supported in the Designer. Projects that use ActiveX, COM, or other 32-bit components, may have compatibility issues. The Out-Of_Process Framework Designer, currently in preview, addresses many of those compatibility issues. However, design-time functionality may not work as well as the 64-bit In-Process Designer. To enable the Out-Of-Process Framework Designer, navigate to the **Tools** > **Options** > **Environment** > **Preview Features**.
>
> For more information about the Out-Of-Process Designer, see [The designer changes since .NET Framework](../../../net/winforms/controls-design/designer-differences-framework.md).

## Create the project

The first step is to create the application project. You will use this project to build the application that hosts the custom control.
Expand Down Expand Up @@ -126,7 +133,7 @@ Now you are ready to debug your custom control as it runs in design mode. When y
3. In the new instance of Visual Studio, open the "DebuggingExample" solution. You can easily find the solution by selecting **Recent Projects** from the **File** menu. The "DebuggingExample.sln" solution file will be listed as the most recently used file.

> [!IMPORTANT]
> If you're debugging a .NET 5 (.NET Core 3.1) or later Windows Forms project, use this instance of Visual Studio to attach a debugger to the the *DesignToolsServer.exe* process. Select the **Debug** > **Attach to process** menu item. Find *DesignToolsServer.exe* in the list of processes and press **Attach**.
> If you're debugging a .NET 6 or later Windows Forms project, don't load the project, instead, use this instance of Visual Studio to attach a debugger to the the *DesignToolsServer.exe* process. Select the **Debug** > **Attach to process** menu item. Find *DesignToolsServer.exe* in the list of processes and press **Attach**. For more information, see [The designer changes since .NET Framework](../../../net/winforms/controls-design/designer-differences-framework.md).

4. Open Form1 in the **Forms Designer** and select the **DebugControl** control.

Expand Down
Loading