Hello community,
Sysinternals is a very good source for advanced system utilities and technical informations. Look at miscellaneous utitilities and
DebugView. "This program intercepts calls made to DbgPrint by device drivers and OutputDebugString made by Win32 programs. It allows for viewing and recording of debug session output on your local machine or across the Internet without an active debugger." It is one of my favorite programs to view variables, state of programs or something else. I think it is a good addition to any log solution - look
here. So I create a small class to use the Debug.Print or Debug.Output command as you know it in VB:
|
Jabaco Source
|
1
2
3
4
|
'-Output to console-
Debug.Print "Dies ist ein Test"
'-Output to DebugView-
Debug.Output "Dies ist ein Test"
|
The class is very simple and it is nothing more to do as embedd it via F1 in Jabaco:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//-Begin----------------------------------------------------------------
/**
* @(#)Debug.java
*
* @author Stefan Schnell
* @version 0.01 09/05/24
*/
import com.eaio.nativecall.*;
public class Debug
{
static
{
try
{
NativeCall.init();
}
catch (Exception ex)
{
}
}
//-Procedure OutputDebugString------------------------------------
private static void OutputDebugString(String Text)
{
VoidCall OutputDebugStringA = new VoidCall("kernel32.dll",
"OutputDebugStringA");
OutputDebugStringA.executeCall(new Object[] {Text});
OutputDebugStringA.destroy();
}
//-Procedure Output-----------------------------------------------
public void Output(String Text)
{
if (Text.length () > 256)
{
Text = Text.substring(0, 256);
}
OutputDebugString(Text);
}
//-Procedure Print------------------------------------------------
public void Print(String Text)
{
java.lang.System.out.println(Text);
}
}
//-End------------------------------------------------------------------
|
Cheers
Stefan