How to debug restart problems??

  • Thread starter Thread starter nithin.papdeja
  • Start date Start date
N

nithin.papdeja

Hi all,

I will be starting a windows service at startup of my pC.Sometimes the
service will start and sometimes it will not

start also some of my applications have problem during restart of the
PC.

The problem is not generatable always i mean five times i restart the
PC only once it may appear or not appear at

all.

Can someone tell me how to debug this type of problems.

i mean like someway from another pc i can see code in my pc while my
system is restarting.Any tools or links related
to this u know can u please tell me

all my code is in C#.net and VC++

Thanks,
Nithin
 
Hi all,

I will be starting a windows service at startup of my pC.Sometimes the
service will start and sometimes it will not

start also some of my applications have problem during restart of the
PC.

The problem is not generatable always i mean five times i restart the
PC only once it may appear or not appear at

all.

Can someone tell me how to debug this type of problems.

i mean like someway from another pc i can see code in my pc while my
system is restarting.Any tools or links related
to this u know can u please tell me

all my code is in C#.net and VC++

Thanks,
Nithin

I've found the only thing to do is as the first line of your service
starting, throw in a MessageBox.Show call.. and quickly attach a
debugger and then hit ok.
 
Hi all,

I will be starting a windows service at startup of my pC.Sometimes the
service will start and sometimes it will not

start also some of my applications have problem during restart of the
PC.

The problem is not generatable always i mean five times i restart the
PC only once it may appear or not appear at

all.

Can someone tell me how to debug this type of problems.

i mean like someway from another pc i can see code in my pc while my
system is restarting.Any tools or links related
to this u know can u please tell me

all my code is in C#.net and VC++

Thanks,
Nithin

Your best solution is using logging. trap AppDomain.UnhandledException
Event and log the exception (do not forget to look also the
InnerException
 
I've found the only thing to do is as the first line of your service
starting, throw in a MessageBox.Show call.. and quickly attach a
debugger and then hit ok.

You should not have any interaction with the desktop from a windows
service.
 
You should not have any interaction with the desktop from a windows
service.

I didn't advocate leaving the service like that.. but it's a quick and
dirty way to attach a debugger so you can see what's going on, which
answers the question.
 
Back
Top