![]() |
![]() |
|
October 15, 2003Remote Debugging over DCOMWell, I have been hung up for over a week with a weird bug in one of my C# apps. What made it even more difficult to track down was that I had to run it in a VMWare session because it is unstable and does nasty things to the system due to its interaction with my kernel-mode driver. (Can you say corrupt the system when you hit a single button... a scriptkiddie paradise.... weeeeeeeeeeee) Well the solution was to use remote debugging. Sounds easy enough. Ya right. The idea of remote debugging is sound. I use remote debugging over serial... well a named pipe actually pretending to be a com port with VMWare. You can see my HOWTO on that over here. This works great and I have been doing this sort of debugging for over six months now. So what harm could there be of also remote debugging my application? Well now that was a pickle. I read every document on MSDN, in the Help docs and through newsgroups. All I had to do was install Remote Debugging Components within the VMWare session and it should work fine. NOT. Tried asking around on IRC and Usenet. I am told to use TCP/IP debugging. After spending a few hours looking on how to do this and trying to set it up I find out it only works for native C/C++ code, and will not work with stand alone C# apps. Grrrrrrrr. Waste more time putting everything back the way it was. Finally I figure I am going to bite the bullet and just install Visual Studio in VMWare and debug it locally. Of course that fails twice (stupid autorun on my host machine STILL runs after I set AutoRun to 0 in the registry). In desperation I step back and decide to rethink my strategy. I have wasted a week trying to get this working, and nothing is helping. After spending most of last night googling every combination I could think of for "remote debugging C# application" I found the jewel that saved my life. I found a document over at gotdotnet.com that was written by Min Kwan Park, a guy within the Microsoft CSharp Debugger QA team. The topic of the document? "The VS7 Debugger doesn’t work. What can I do?". No way. This can't be. Sure enough the answer sits in the last few paragraphs of the document. On XP Pro, because of the default security setting for "sharing and security model for local accounts", this remote debugging is not allowed by default. GRRRRRRRRRRRRRRRRRRRRRRRR. Its an undocumented setting that has to be changed for remote debugging to work! Well, to be fair I guess it was documented in this jewel, but it wasn't found during the last week of searching on MSDN, the VS help docs or even the newsgroups. So now everything is working great. With my multiple monitors I have one hosting my remote debug session of my kernel driver with WinDgb and the other hosting my remote debug session of my C# app in the Visual Studio .NET debugger. 2 minutes later I found my bug. (And god what a dumb bug it was). *sigh* Posted by SilverStr at October 15, 2003 10:16 AM | TrackBack |
![]() ![]()
My 5 Favorite Books
Writing Secure Code
Secure Programming Cookbook Security Engineering Secure Coding Principles & Practice Inside the Security Mind ![]()
My 5 Favorite Papers
Smashing the Stack
Penetration Studies Covert Channel Analysis of Trusted Systems DoD Trusted Computer System Evaluation Criteria NSA Security Recommendation Guides ![]()
Archives
December 2005
November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 ![]() |
|