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 / July 2006

Tip: Looking for answers? Try searching our database.

debug custom assemblies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dierk Droth - 02 Jul 2006 08:30 GMT
Hi,

My application provides a feature to load custom assemblies. The application
is build in release mode (/optimize). This is .NET 2.0.

As a user wants to debug his custom assembly be e.g. forcing a debugger
break ("Debugger.Break()"), he experiences that he can not inspect the value
of the public properties of any class, since they are optimized away:
"Cannot evaluate expression because the code of the current method is
optimized."

This is true even as the compiled assembly is built in debug mode using
"/optimize-".

I found something in docs, saying that the /optimize settings of the calling
assembly  - which is my app built in release mode - take precedence.

What can be done to make the custom assembly fully debuggable?

Thanks in advance.

Dierk Droth
William Sullivan - 03 Jul 2006 13:34 GMT
Not sure, but have you considered the simple solution:  Give developers of
the custom assemblies a "debug" (/optimize-) version of your program to debug
against?  You don't have to give them the symbol (pdb) files for this to
work...

> Hi,
>
[quoted text clipped - 18 lines]
>
> Dierk Droth
Dierk Droth - 03 Jul 2006 14:07 GMT
Thanks for your reply.

Yes, I'm aware of this option. However this is quite cumersome, since
a) I had to provide a debug version ;-)
b) the user had to restart the app using this debug version. Note: my app
provides .NET scripting, so the user can edit, compile and run within the
app. But then had to start to debug.

I also considered providing a GetXXX() method for any XXX property, since
the optimizer probably won't optimize these methods away (have not yet tested
though). However, clumpsy as well ...

Any other ideas?

Thanks

Dierk Droth

> Not sure, but have you considered the simple solution:  Give developers of
> the custom assemblies a "debug" (/optimize-) version of your program to debug
[quoted text clipped - 23 lines]
> >
> > Dierk Droth

Rate this thread:







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.