debug dotnet projects

T

tascien

Hi guys, here is a puzzling question... I am able to debug my project
on my dev server very fine. Now, here is a question:

- I set the project to release. I copy the project to the production
server.
- the project has a problem on the production server.
- How do i debug it?

Should I install visual studio on the production server? how do i step
through the code on the production server? It gets so difficult to
debug published dotnet projects. Any hint would be appreciated.

Tascien
 
K

Kerstin Pirrung

Hi!

Can't you set your paths for the debugger on your machine to debug a
project running on whatever machine it is as long as you're in the network
and have the appropriate privileges?

Depending on how fast your network is, installing the environment on the
server and debugging locally may be better for your nerves though.

Regards,

Kerstin
 
K

Kevin Spencer

First, let's step back and look at the process of debugging from a purely
conceptual point of view.

Debugging is a process which involves several different aspects:

1. Following the flow of a process.
2. Identifying the source of erroneous behavior
3. Examining the value of data that changes during the process.

Visual Studio and other development tools provide debugging tool which make
the process of debugging easier, especially, but not limited to, during the
development process. Some of these tools are also available after the
development process. Visual Studio includes tools for Remote Debugging. You
can review all of the Debugging capabilities of Visual Studio at the
following URL:

http://msdn2.microsoft.com/en-us/sc65sadd.aspx

In addition, there are other options available to you, from the "old
school," but using the new technologies. For example, you can use Exception
Logging with a Debug build of a project to log the details of an exception,
in order to provide clues as to what the cause of the exception was. The
System.Exception-derived classes often provide a wealth of information about
the cause of an exception, and can always provide a Stack Trace to assist
you in your diagnosis.

Also, you can use logging to log the values of data that changes during the
process as a diagnostic tool.

We have some Windows Services that incorporate logging, as well as
incorporating the ability to send emails to the developers whenever
something goes awry. This way we are informed of any problems immediately,
even though the Service is, of course, running in the background of another
machine on our network.

Perhaps these few points will help in some way. If you just keep your mind
on the basic concepts of debugging, you may think of a few of your own as
well.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.
 
T

tascien

The problem is not the exceptions. I can try, catch exceptions and
write them to the file fine. The issue comes with those errors that are
logical errors. such as program doing what it is not supposed to do.

when you have step through capability on the dev server, you can easily
print out variable names on the debug window and watch the variables.
but on the prod server it become hard.

any hint on how I can attach a debugger to the prod server and step
through using my visual studio? do i have to put the source code on the
prod server?
 
K

Kerstin Pirrung

Hi again!

Do you have network access to the prod server from your development
machine? And are you privileged to run prodessos on the prod server?

If yes, you can run the application an the prod server and debug it from
your development machine, with the VS and sources and everything on your
local machine.

Just read through the link Kevin gave you about remote debugging.

Regards,

Kerstin
 
K

Kerstin Pirrung

(e-mail address removed) wrote in @h76g2000cwa.googlegroups.com:
Yes,

I have access to the prod server. I however don't see an article here
that talks about remote debuging... is this link correct?
http://msdn2.microsoft.com/en-us/sc65sadd.aspx

Yep!

From "Debugging in Visual Studio"
(http://msdn2.microsoft.com/en-us/sc65sadd.aspx)
just go to "Debug Settings and preparations"
(http://msdn2.microsoft.com/en-us/d0b8xh0y.aspx)
then "Remote debugging setup"
(http://msdn2.microsoft.com/en-us/y7f5zaaa.aspx)

Regards,

Kerstin
 

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