question

SenthilKumaranRajan-5089 avatar image
0 Votes"
SenthilKumaranRajan-5089 asked TianyuSun-MSFT commented

Windows Forms Designer debugging in NetCore

We could not able to perform design time debugging in NetCore Windows Forms.

We have tried to perform debugging as like we perform for .NetFramework but our source code cannot be able to debug at design time. We have followed the below steps.

  1.  Set the break point in our custom control constructor.
    
  2.  Set the start up project as “devenv.exe”.
    

94803-image.png
3. On running the application it shows another VisualStudio instance where we will select the project that we need to debug.
4. Then on opening the designer and adding the custom control from toolbox.

Expected result:
The Break point set at out custom control constructor should hit.

Observed result:
The break point hit properly in .Net Framework project. But not for Net core project.

Please let us know if we need to enable any other operations to debug for NET core project.

Note:
We have enabled preview feature for NetCore.


94793-image.png


windows-formsvs-debugging
image.png (41.2 KiB)
image.png (9.4 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The .NET Core designer is running in a separate process, not devenv.exe. So you should attach to that separate process instead.

0 Votes 0 ·

Have you considered installing a non-preview (not talking about form designer) version of Visual Studio?

0 Votes 0 ·

Hi @SenthilKumaranRajan-5089 , welcome to Microsoft Q&A forum. Have you also tried to update VS 2019 to the latest version, and repair VS 2019? If you create a new simple custom control and create a new .NET WinForm project to debug, will this newly created project work?

0 Votes 0 ·

Hi @SenthilKumaranRajan-5089 , do you have any update? Have you also tried check the Enable native code debugging option in Properties > Debug > Debugger engines > Enable native code debugging?

0 Votes 0 ·

0 Answers