Arkadiusz Smolak wrote:
Unfortunetely it doesn't work for me. I have to VS studio opened. The first
one I'm attaching to the socond proccess nad set breakpoint in form
constructor (it's my derrived form) then I'm switching to the second
instance and opening form in designer. The debugger from first session
doesn't stop in constructor.
Arek
I'm afraid I don't quite follow what you're doing. The idea goes
something like this:
public class MyForm : System.WIndows.Forms.Form
{
public MyForm()
{
... my form's constructor code ...
}
}
public class MyDerivedForm : MyForm
{
public MyDerivedForm()
{
... usual constructor stuff ...
}
}
If you set Visual Studio as the startup program for your project, then
set a breakpoint inside the MyForm constructor, the constructor should
run if you open MyDerivedForm in the Visual Studio Designer. If you
open MyForm in the Designer, then the breakpoint will not be hit, since
the constructor that is running is that for System.Windows.Forms.Form,
not MyForm. The Designer runs the MyForm constructor only when
designing MyDerivedForm.
Is that what you're doing and it still doesn't work for you?