New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: wxLogDebug: OutputDebugString: nothing printed in output pane #1550

Closed
flederwiesel opened this Issue Feb 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@flederwiesel

flederwiesel commented Feb 15, 2017

Hi,
for convenience, I would like to use the wxLogDebug() function to print to the CodeLite output pane. However, no output appears at all.
Building a simple application using MinGW with/without wxWidgets shows output in DbgView as well as under gdb. My impression is that CodeLite is not (properly) reading the message back from gdb in this case. Is this the expected (normal) behaviour? Am I doing something wrong?

Any more info needed?

Regards,
Tobias

@eranif

This comment has been minimized.

Show comment
Hide comment
@eranif

eranif Feb 16, 2017

Owner

DbgView

What is this view? I am not sure we have one named like this

My impression is that CodeLite is not (properly) reading the message back from gdb in this case

CodeLite reads everything that GDB prints to the stdout/stderr

Owner

eranif commented Feb 16, 2017

DbgView

What is this view? I am not sure we have one named like this

My impression is that CodeLite is not (properly) reading the message back from gdb in this case

CodeLite reads everything that GDB prints to the stdout/stderr

@flederwiesel

This comment has been minimized.

Show comment
Hide comment
@flederwiesel

flederwiesel Feb 16, 2017

Hi eranif,
Dbgview is a Windows Sysinternals tool showing messages coming from OutputDebugString.

If using OutputDebugString() - which is eventually called by wxLogDebug() I think - the message is visible in Dbgview as well as gdb (one at a time - MS seems to have planned exclusive access here (?)).

A program a simple as this is able to printo to both:

$ cat wxLogDebug.cpp
#include <wx/wx.h>
#include <wx/log.h>

int main(int argc, char **argv)
{
        wxLogDebug("Hmm...\n");
        return 0;
}

$ make
g++ -o wxLogDebug.exe wxLogDebug.cpp -I C:\wxWidgets/lib/gcc_dll/mswu -I C:\wxWidgets/include -LC:\wxWidgets/lib/gcc_dll -lwxmsw31ud_core -lwxbase31ud -lkernel32 -luser32

$ gdb wxLogDebug.exe
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
...
Reading symbols from wxLogDebug.exe...done.
(gdb) run
Starting program: e:\src\flederwiesel\codelite\wxLogDebug\wxLogDebug.exe
[New Thread 2428.0x1da0]
warning: Hmm...


[Inferior 1 (process 2428) exited normally]
(gdb) q

Running the same program under CL however does not print any message for me.

Any ideas/suggestions? What I am doing wrong?

Regards,
Tobias

flederwiesel commented Feb 16, 2017

Hi eranif,
Dbgview is a Windows Sysinternals tool showing messages coming from OutputDebugString.

If using OutputDebugString() - which is eventually called by wxLogDebug() I think - the message is visible in Dbgview as well as gdb (one at a time - MS seems to have planned exclusive access here (?)).

A program a simple as this is able to printo to both:

$ cat wxLogDebug.cpp
#include <wx/wx.h>
#include <wx/log.h>

int main(int argc, char **argv)
{
        wxLogDebug("Hmm...\n");
        return 0;
}

$ make
g++ -o wxLogDebug.exe wxLogDebug.cpp -I C:\wxWidgets/lib/gcc_dll/mswu -I C:\wxWidgets/include -LC:\wxWidgets/lib/gcc_dll -lwxmsw31ud_core -lwxbase31ud -lkernel32 -luser32

$ gdb wxLogDebug.exe
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
...
Reading symbols from wxLogDebug.exe...done.
(gdb) run
Starting program: e:\src\flederwiesel\codelite\wxLogDebug\wxLogDebug.exe
[New Thread 2428.0x1da0]
warning: Hmm...


[Inferior 1 (process 2428) exited normally]
(gdb) q

Running the same program under CL however does not print any message for me.

Any ideas/suggestions? What I am doing wrong?

Regards,
Tobias

@eranif eranif closed this in 818295f Feb 19, 2017

@eranif

This comment has been minimized.

Show comment
Hide comment
@eranif

eranif Feb 19, 2017

Owner

The Output tab will not capture and print messages printed via OutputDebugString

Owner

eranif commented Feb 19, 2017

The Output tab will not capture and print messages printed via OutputDebugString

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment