Question Visual Studio Debug - Please Help

evad4682

Well-known member
Joined
Nov 7, 2005
Messages
55
Programming Experience
Beginner
I have recently moved from XP Pro VS2008 to Win7 Ultimate VS2010 and all the sudden I am unable to debug code and I can't write log files (ex: c:\mylog.txt) anymore. What am I missing here? I am using the same code that used to work.

My biggest issue is my inablility to debug. I was writting a quick app to check a service on a remote machine and I wanted to debug this app to trap all the possible errors. So I pointed my code to check my service local.

Dim status As String
Dim svcController As ServiceController

svcController = New ServiceController

Dim hostname As String = "."
Dim servicename As String = "Print Spooler"

svcController.MachineName = hostname
svcController.ServiceName = serviceName

svcController.Refresh()
status = svcController.Status.ToString
I know this code wont work - that's the point. I wanted to see what errors I would get so I can better trap these errors. SO.... When I run this code via debug no errors are thrown. The debugger just exits like the code is complete and my windows form pops up. When I run the compiled executable I get an error.

When I try to use a stream writter to write a log file to C:\ I get the same issue. When the debugger comes to the line to write it just stops running and my windows form just pops back up like the code has completed successfully.

Is this a permission issue with Win7 or is my installation of VS wrong?

Thanks

:mad::mad::mad:
 
Top Bottom