mpitak
asked on
Debug VB.NET program on program deployed PC
When I developed program with VB.NET and I can test out or debug the program. That's easy to know where ever it has bug or error. But after building (compiling) it, I deploy to other PC (where it does not have VB development software installed). And when I run the program and if it found error. My issue is that how can I know which program line created the error. In other word, how I trace program running steps.
Any recommendation ? Please !
Any recommendation ? Please !
ASKER
Hello ptakja,
As your suggestion, it will start capturing log after 'Try' command. Can I have log from program started until it's end.
As your suggestion, it will start capturing log after 'Try' command. Can I have log from program started until it's end.
Sure. You can call the EventLog.WriteEntry routine anytime to log messages.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I wrote an error logger component that I use to log application errors, trace messages, informational messages, etc... to a log file on the local PC as well as a database.
You can also log messages to the Windows Event Log with a single line of code. I don't remember the exact syntax, but it is something like EventLog.WriteEntry().
So in your code you could have something like this:
Try
<put your code here that could throw an exception>
Catch ex As Exception
Call EventLog.WriteEntry(String
End Try