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 / Visual Studio.NET / Debugging / October 2003

Tip: Looking for answers? Try searching our database.

Mixed C++ debugging in 2003: No source code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt Bookman - 30 Oct 2003 18:21 GMT
We have a lot of C++ code that we have been moving to .NET.
When enabling the /clr on our projects, we have found that we can
debug *either* the managed code OR the unmanaged code.

In order to debug the unmanaged code, we select "Native Only" as the
debugger type.
In order to debug the managed code, we select "Managed Only" as the
debugger type.

No matter which mode we chooose, even if it is Mixed or Auto, we can
only debug one set of code or the other.

If debugging "Managed", then unmanaged breakpoints are not hit.
If debugging "Native", then managed breakpoints are hit, but we get a
message that no source could be found, but we can look at the
disassembly.

Any tips here?  This appears to have gotten worse from VS.NET 2002 to
VS.NET 2003.
Matt Bookman - 31 Oct 2003 20:35 GMT
> Any tips here?  This appears to have gotten worse from VS.NET 2002 to
> VS.NET 2003.

The key here turned out to be the /ASSEMBLYDEBUG linker switch.  Once
I turned that on, I could step into both managed and unmanaged code
just fine.  Still having problem with viewing all variable data in
different scenarios, but I'll keep looking into that.

I'm not sure why MS chose to change behavior from 2002 to 2003, but:

 In version 1.0 of the .NET Framework, the Microsoft Visual C++
 compiler adds the DebuggableAttribute when the /clr and /Zi compiler
 options are specified.
 In version 1.1 of the .NET Framework, you must either add the
 DebugabbleAttribute manually in your code or use the
 /ASSEMBLYDEBUG linker option.

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.