Remote debugging 
Author Message
 Remote debugging

Hello everyone, does someone know how to make remote debugging of a VB
application (normal 32bit exe)? I explain: I'd like to test an application
I've done directly on customer installation without installing on
customer's machine the whole Visual Studio 6.0 IDE. Has someone an idea for
making out of this?
Thanks in advance!
giovanni


Wed, 12 May 2004 06:47:28 GMT  
 Remote debugging
Giovanni:

Howdy.  Wow!  That would be a great tool.  I simply use a log file to record
important points in my programs' execution.  I also usually include a debugging
mode which, when turned on, increases the amount of information written to the
log file.  I have encapsulated the entire log file into a class so it is very
easy to use:

public LogFile as clsLogFile

set LogFile = new clsLogFile

' the log file is initialized with the reset method, app.title and
app.hinstance are passed
' so that multiple instances of the same program can record logging info in the
same
' log file, the logfilename is passed so that the developer can use whatever
naming
' convention is desired.  The third parameter controls whether the log file
will include
' a time-stamp on each output line.
LogFile.Reset app.title, app.hinstance, LogFileName, True

Sub LogFileExample()
' when you want to record an event to the logfile, use the WriteData method.
The
' optional second parameter lets you create strcutured output.
    LogFile.WriteData "START: LogFileExample.", 2
    LogFile.WriteData "running LogFileExample"
    LogFile.WriteData "END: LogFileExample", -2
End Sub

The previous example would create a logfile that looks something like this
(note that the 0001232 would be the instance handle of the running
application):

******************
0001232 12:32:13 INIT: application title would appear here
0001232 12:32:13 INIT: machine name would appear here
0001232 12:32:14 START: LogFile Example.
0001232 12:32:14   running LogFile Example
0001232 12:32:15 END: LogFileExample

To include optional logging, simply use a globally scoped variable to track the
status of your "debugging mode:"

public enum SystemStates
    STATE_DEBUG_MODE
end enum
public SS as SystemStates

To turn on extra logging:

SS = SS or STATE_DEBUG_MODE

To turn it off:

SS = SS and not STATE_DEBUG_MODE

To test for debugging mode:

If SS and STATE_DEBUG_MODE then
  LogFile.WriteData "this is only written when debug mode is on"
end if

The class includes several other method, for example, LogFile.View launches
notepad to display the log file.

Since I wrote the class while employed by a software company, I can't give the
class away, but I could probably convince the owner to sell it for a couple of

chris judge

Quote:

> Hello everyone, does someone know how to make remote debugging of a VB
> application (normal 32bit exe)? I explain: I'd like to test an application
> I've done directly on customer installation without installing on
> customer's machine the whole Visual Studio 6.0 IDE. Has someone an idea for
> making out of this?
> Thanks in advance!
> giovanni



Tue, 11 May 2004 14:28:12 GMT  
 Remote debugging


Quote:
>Hello everyone, does someone know how to make remote debugging of a VB
>application (normal 32bit exe)? I explain: I'd like to test an application
>I've done directly on customer installation without installing on
>customer's machine the whole Visual Studio 6.0 IDE. Has someone an idea for
>making out of this?

You could certainly hook up online to your client, providing you set
up a winsock control to channel debug info to a port.
I'd imagine a command line driven one.
ie: myExe /d lp:1000  rh:youraddress rp:2000
Which then your code would act on by trying to establish a connection
on local port 1000 with youraddress  at port 2000. Given a succesful
connect, it could then start sending debug info to you. You could
perhaps even go as far as controlling the program and it's variables
by using some command packets. I think it's workable.

Regards, Frank



Tue, 11 May 2004 15:36:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A New Tool: VBRunAnalyzer - Remote Debugging for Visual Basic 6.0

2. Remote debugging VB DLLs?

3. MTS remote debugging

4. Remote automation problems and debugging

5. Debug Remote DLL

6. debug a remote DCOM server

7. Debugging remote server DCOM errors

8. HELP CLR20r3 need help to debug crash of exe startup at remote installation

9. accessing remote resources on a remote computer

10. remote Authentication for running a remote wsh script

11. passsing argument to a remote script - with remote WSH

12. 'Remote Scripting Error: Page invoked does not support remote scripting

 

 
Powered by phpBB® Forum Software