AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones varias de WINDEV
  • Use conditions according to the platforms
  • Closing the trace window
  • Trace window
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
A partir de la versión 17 (78), StartTrace se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por TraceStart.
Opens the trace window or saves the trace information in a text file.
Remarks:
  • TraceStart has no effect if the trace window is already opened.
  • TraceStart is optional. The first call to Trace or to TraceBuild automatically opens the trace window.
Ejemplo
WINDEVWEBDEV - Código ServidorWEBDEV - Código NavegadorReportes y ConsultasiPhone/iPadApple WatchJavaCódigo de Usuario (UMC)Ajax
// Opens the trace window
TraceStart()
...
// Writes into the trace window
Trace("Calculation result: " + ResCalcul)
WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/iPadApple WatchJavaCódigo de Usuario (UMC)Ajax
// Disable the calls to the Trace function
TraceStart(trDisable)
...
Trace("Calculation result: " + ResCalcul) // Trace function has no effect
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)Ajax
// Save the information found in 
// the trace window in the "C:\Trace\MyFile.txt" file
TraceStart(trFile, "C:\Trace\MyFile.txt")
...
Trace("Calculation result: " + ResCalcul) 
// No trace window is displayed
// This information will be saved in the "C:\Trace\MyFile.txt" file
Sintaxis
TraceStart([<Characteristic> [, <Trace file>]])
<Characteristic>: Optional constant
Trace characteristics:
trConsoleThe trace data is sent to the console.
WEBDEV - Código ServidorWEBDEV - Código NavegadorAndroidWidget Android iPhone/iPadApple WatchJavaPHP This constant is not available.
Novedad versión 2026
AndroidWidget Android iPhone/iPadApple Watch The constant trConsole corresponds to the default value. The trace window will not be displayed.
  • iPhone/iPadApple Watch the requested information will be displayed in the window for standard output of Xcode.
  • AndroidWidget Android the requested information will be stored in the application log (at runtime or in emulation mode). This log can be viewed when the device is connected via USB or when using the emulator from the DDMS application provided with the Android SDK.
trCreationClears the trace file.
trDisableAll the calls to Trace will be ignored.
trFileThe trace window will not be displayed anymore and the information found in the trace window will be saved in the file named <Trace file>.
Linux Only this constant is available. By default, this file is created in the UNIX temporary directory with the name "Trace_<Project>.txt".

WEBDEV - Código Servidor In AWP mode, only this constant is available.
trTopMostThe trace window will be displayed above all system windows.
AndroidWidget Android iPhone/iPadApple WatchJavaJavaPHP This constant is not available.
trWindow
(Default value)
The trace window is displayed in the upper-left corner of the screen.

Novedad versión 2026
AndroidWidget Android iPhone/iPadApple Watch When testing on the mobilethe trace window is displayed on the device (test via WMDev (for iOS applications), via USB or Wi-Fi).
When running on thethe trace window will be displayed.
Warning: the constant trWindow constant does not correspond to the default value.

WEBDEV - Código Servidor The trace window will not be displayed when a site is deployed.

PHP The trace is displayed in the current page.
trWindow + trFileThe trace window will be displayed and the content of the trace window will also be saved in the file named <Trace file>.
PHP The trace is displayed in the current page and in a file.
WEBDEV - Código Navegador This parameter is not available.
<Trace file>: Optional character string
Name and full path of the file where the information found in the trace window will be saved. If this parameter is not specified, the trace file will be created at the root of the "C" drive and its name will have the following format "Trace_<ProjectName>.txt".
Linux If this parameter is not specified, the trace file will be created in the temporary UNIX directory as "Trace_<ProjectName>.txt".
WEBDEV - Código Navegador This parameter is not available.
AndroidWidget Android Java If this parameter is not specified, the file is created in the current directory of the application (known via fCurrentDir) under the name, "Trace_<ProjectName>.txt".
iPhone/iPadApple Watch If this parameter is not specified, the file is created in the "documents" directory of the application and it is named "Trace_<ProjectName>.txt".
Observaciones

Use conditions according to the platforms

Linux TraceStart is used to save the requested information in a file. By default, this file is created in the UNIX temporary directory with the name "Trace_<Project>.txt".
PHP TraceStart is used to display the requested information in the current page or to store it in a file.
WEBDEV - Código Servidor In AWP mode, TraceStart can only be used to save the requested information in a file.
AndroidWidget Android TraceStart is used to save the requested information:
  • in the application log (at runtime or in emulator mode). This log can be viewed when the device is connected via USB or when using the emulator from the DDMS application provided with the Android SDK.
  • in a specific text file.
iPhone/iPadApple Watch TraceStart is used to:
  • display the requested information in the window for standard output of Xcode.
  • save the requested information in a specific text file.

Closing the trace window

TraceEnd is used to close the trace window.
If the trFile constant is specified, TraceEnd stops saving to the trace file.
WEBDEV - Código ServidorWEBDEV - Código NavegadorAjax

Trace window

The trace window displayed from a Browser code is different from the one displayed from a Server code. Therefore, two different trace windows can be opened at the same time.
Componente: wd310vm.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Video Trace
https://youtu.be/scI5wQu-jXk
//
fDelete("C:\TEMP\ARQUIVO.TXT") // ELIMINA ARQUIVOS CASO JA EXISTA
TraceStart(trFile+trWindow,"C:\TEMP\ARQUIVO.TXT")
FOR EACH cliente // ESTOU PERCORRENDO A TABELA CLIENTE // I AM PERCURRING THE CLIENT TABLE // Je passe à la table des clients
Trace(cliente.id_cliente+"|"+cliente.razao_social_nome+"|")
END
TraceEnd() // FINALIZANDO O TRACE // FINISHING THE TRACE // FINITION DE LA TRACE
ShellExecute("C:\TEMP\ARQUIVO.TXT")
amarildo
30 12 2018

Última modificación: 08/10/2025

Señalar un error o enviar una sugerencia | Ayuda local