Debug and trace


Convertion-Time

  After/during conversion, look at s2s console.
  This console is also saved independently in file conlsole.txt, sibling to s2s.exe.
  Programmer can shutdown s2s GUI and still look at console.txt.
  Marks *-* mean that converter made some changes and programmers should accept or not accept them.
        *!* mean that prgrammer's manual work required for sure.


Run-Time Debugging

  1. Form VB6 IDE
  2. Debugger inserted by Converter
      


1. Best, but slow debug method: use Visual Basic 6 IDE debug (F8):

      Details for Windows 98:
       Prelimiary steps may help to avoid problems and "dll lock":
       
         1. Shut down PWS.
         2. Delete "myproject.dll".
         3. Delete "myproject.dll" from recicle bin.
         
       ASP Script Time out can be extended to let user to debug slowly.

       Basic steps:
         1. Run result-dll-project in debug mode (F8 or Shift+F8).
         2. If not run yet:
             a. Run PWS manager.
             b. Start PWS.
             c. Start browser.
         5. From browser, goto project's page 
                 (in D, Dynamic, mode; ?scenario=D)
         6. What happens: browser calls, asp, asp calls dll-vb-project,
            VB IDE starts to display debugged statements, and user
            is able to trace running application.
             




Use web_c - debugger built into result.

  web_c is an instance of class web_frmConsole.

  To set in main.htm schema.

  This class automatically added after conversion 
  and web_c automatically created in Sub Main at startup.
 
  By default, TraceApplication property of this
  class is disabled, so this class does not have
  effect on work of Web-Application.

  When trace is enabled, then debug output is done to console file. 
  (VB4 may allow to run console window on server,
  but this possibility is not discussed here. The similar
  method of projectfolder_desktop is not discussed also.)

  To enable trace, 
     - web_c's  property TraceApplication set to True,
     - output method ".t s" inserted to 
       Application code (where to insert is the
       responsibility of programmer.)
  
  In particular to enable trace
    - from Web-Application startup, add code
        web_c.TraceApplication = True
      to Main Subroutine which starts up the Application
      and insert statements 
        web_c.t 'text to output'
      in application source code.

      To automate this, see also:
      trace_application flag in main.txt.

    - from Web Browser, add fragment 
         &trace=true
      to URL's Query String.

   Note: Every StartUp or Session Restart flushes
         console file web_console.txt

 

This section is merely a draft kept to preserve some ideas of debugging:

Run-Time in VB4 environment

Application Caller functionality is abandoned.

  Debugging with Modeless mode of projectfolder_desktop:

  This functionality may be work in VB4 environment, but unlikely in VB6.
  To debug/run the dll in desktop environment,
  project 'source_name'_desktop can be used.
  Before running this project, 
  establish-the-reference to created dll. 
   
       1. Debug locally using Application Caller
          created in folder 'source_name'_desktop.
          Most thorough debug is using VB IDE:

             a) Start 'source_name' dll project by
                clicking key F8 and finish
                Sub Main. Application will be 
                running an waiting for call.

             b) Start Application Caller in
                another VB IDE instance and 
                establish-the-reference to
                running Application started in
                step a).
                ((Re)Establish-the-reference example is below.
   For example, in VB4 IDE menu\Tools\References,
   uncheck MISSING 'source_name',
   close References window,
   open References window again,
   find appropriate 'source_name',
   check it.
  )
  Run Application Caller and proceed     debug.

Common Exceptions In ASP: 500 Variable is undefinedwhen calling ExchangeData dll's method May be caused when <OBJECT ... tag is forgotten to be added for dll to global.asa