Hola,
La unica manera de obtener esta informaci贸n es activando el flag /b para activar el debugger. Actualmente activaria de manera automatica el debugger de FWH, pero es muy f谩cil en principio obtener esta informaci贸n, sin necesidad de que se nos active el debugger de FWH y obtener la informaci贸n dentro de un errorsysw.prg.
El inconveniente de esta t茅cnica es que solo es aconsejable para modos de testeo, ya que al compilar con /b, harbour realiza sus propios procesos para manejar la informaci贸n de depuraci贸n, y puede ralentizar el proceso.
B谩sicamente tendriamos de hacer:
Poner por ejemplo en el modulo principal:
#include "FiveWin.ch"
/* Mode of __dbgEntry calls (the first parameter) */
#define HB_DBG_GETENTRY 聽 聽 聽 6 聽/* initialize C __dbgEntry function pointer */
#define HB_DBG_ACTIVATE 聽 聽 聽 7 聽/* activate debugger interface */
STATIC aStack
FUNCTION __dbgGetStack() ; RETU aStack
*------------------------------------------------------------------------
FUNCTION __dbgEntry( nMode, uParam1, uParam2, uParam3, uParam4, uParam5 )
*------------------------------------------------------------------------
聽 聽DO CASE
聽 聽 聽 聽CASE nMode == HB_DBG_GETENTRY
聽 聽 聽 聽 聽 聽 __dbgSetEntry()
聽 聽 聽 聽CASE nMode == HB_DBG_ACTIVATE
聽 聽 聽 聽 聽 聽 aStack := uParam3
聽 聽ENDCASE
RETU NIL
Luego nos podriamos crear nuestro propio errsysw.prg
#include "FiveWin.ch"
external _fwGenError 聽 // Link FiveWin generic Error Objects Generator
#define NTRIM(n) 聽 聽( LTrim( Str( n ) ) )
//----------------------------------------------------------------------------//
// Note: automatically executes at startup
proc ErrorSys()
聽 聽 ErrorBlock( { | e | ErrorDialog( e ) } )
return
//----------------------------------------------------------------------------//
static function ErrorDialog( e ) // -> logical or quits App.
聽 聽local nI, cNameVar
聽 聽local nLevel := __dbgprocLevel() - 1
聽 聽local aPila 聽:= __dbgGetStack()[1]
聽 聽local aVar 聽 := aPila[5]
聽 聽local cTitle := aPila[1] + ' => Function ' + aPila[2] + ' (' + ltrim(str( aPila[3])) + ')'
聽 聽local cInfo 聽:= ''
聽 聽FOR nI := 1 TO Len( aVar )
聽 聽 聽 聽cNameVar 聽:= aVar[nI][1]
聽 聽 聽 聽nLevelVar := aVar[nI][2]
聽 聽 聽 聽uVal 聽 聽 聽:= __dbgvmVarLGet( nLevel , nLevelVar )
聽 聽 聽 聽cInfo += cNameVar + Chr( VK_TAB ) + cValToChar( uVal )
聽 聽 聽 聽cInfo += CRLF
聽 聽NEXT
聽 聽MsgInfo( cInfo, ctitle )
聽 聽QUIT
RETU NIL
Y Listos
Este codigo de test:
#include 'fivewin.ch'
FUNCTION Main()
聽 聽 LOCAL dMiVar := Date()
聽 聽 LOCAL nNace 聽:= 1967
聽 聽 LOCAL cName 聽:= 'Charly'
聽 聽 LOCAL aData 聽:= { 1111, 2222 }
聽 聽 MsgInfo( nEdad + cName )
RETU NIL
Produce este error:
A partir de aqui te puedes crear tu errsysw como mas se adapte a tus encesidades, pero entiendo que esta practica es solo aconsejable para depuraciones....