Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2005

Tip: Looking for answers? Try searching our database.

How to debug while in design time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Laurent - 14 Dec 2005 10:20 GMT
Hi All

I've just created a new designer form my user control.  I can not debug
(step into) my code because it is executing in design-mode and debugger is
not attached at this time.

Is there a way to attach the debugger ?

Thanks
Laurent
Michael Groeger - 14 Dec 2005 10:33 GMT
Laurent,

just an idea, you could try to attach the debugger to your devenv.exe
instance running. But I've never tried.

Regards,
Michael

> Hi All
>
[quoted text clipped - 6 lines]
> Thanks
> Laurent
Laurent - 14 Dec 2005 11:17 GMT
Just to say: it was a very very very very ..........(1 billion times
lol).............. very very good idea ))))

If I attach the debugger to the running Visual Studio I can catch the
exception without crashing (and send report).
If I just want to step into but have no exception, I have to call
System.Diagnostics.Debugger.Break(); to generate an exception and reattach
to the debugger (new instance or not).

So, I am happy : it works

> Laurent,
>
[quoted text clipped - 15 lines]
>> Thanks
>> Laurent
Michael Groeger - 14 Dec 2005 11:34 GMT
your welcome ;)

> Just to say: it was a very very very very ..........(1 billion times
> lol).............. very very good idea ))))
[quoted text clipped - 26 lines]
> >> Thanks
> >> Laurent
Frans Bouma [C# MVP] - 15 Dec 2005 10:13 GMT
> Just to say: it was a very very very very ..........(1 billion times
> lol).............. very very good idea ))))
[quoted text clipped - 6 lines]
>
> So, I am happy : it works

    To automate it: go to the properties of the project in vs.net, and in
there go to the Configuration -> Debugging section, there, you select
Debug mode: Program (click Apply)  and for Start application you
specify devenv.exe

    Now set a breakpoint in your code and press F5. You'll get another
Devenv to open. Load a testproject in where you USE the designer, and
you should hit your breakpoint in the other instance.

        FB

> > Laurent,
> >
[quoted text clipped - 12 lines]
> > >
> >> Is there a way to attach the debugger ?

Signature

------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.