attach to process of .net app not started in debugger?

L

Les Caudle

Is there a way to attach to a process of a .NET app not started in debug mode?

I'm having a problem with an app on a remote server, with a 3rd party .net
object I dont' have source files for anyway.

I'd like to be able to just attach to the hung process and get some debug info.

Is this possible?
 
J

Jeffrey Tan[MSFT]

Hi Les,

Based on my understanding, I assume your "debug mode" means the application
debug build. That is your application components is built in release
configuration.

Yes, you can use any debugger to attach a release build application as long
as you have enough priviledge/permissions on remote machine. Debugger will
use .Net/Win32 debugging service to attach the process, so it does not
matter if the target is debug or release build.

Normally, release build is not special comparing to debug build. It will
just perform optimize for the generated code. For example, if there is any
local variables can be eliminated, the release build will discard them in
generated assemblies. Below link talks about the C/C++ code difference
between debug and release build, however, the idea is the same for .Net
compiler:
"Debug versus Release build"
http://www.dotnetheaven.com/Uploadfile/mahesh/DebugaRelease05192005033225AM/
DebugaRelease.aspx

Finally, to debug 3rd party assembly, if the assembly is not obfruscated, I
would recommend you to download Reflector from the link below and use the
Reflector to examine the source code of it. Due to the strong metadata in
the .Net assembly, it is possible for Reflector tool to decompile the
assembly code for review.(A extreme example is .Net Framework assemblies,
which can be decompiled in Reflector for learning)
http://www.aisto.com/roeder/dotnet/

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top