Closed joshgentry closed 3 years ago
It looks like GDB is outputting these strings as log-stream output so you will need to have engineLogging enabled. There is no good way for us to only have DebugOutputStrings shown.
log-stream-output →
"&" c-string nl
From https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax
Also, is there a reason why you are using gcc
and gdb
instead of cl
and the windows c++ debugger?
@WardenGnaw, thanks for the response. I prefer to use gcc
and gdb
because this project builds across platforms and is developed with the same stack on each (Linux / OSX / Windows all using GCC and GDB for debugging).
Is there a way, that I might have missed in my searches, to filter the output with a RegEx or based on log type?
edit: I realize the example using OutputDebugString is odd given the cross-platform build desire, but there are Windows-specific chunks of code locked in #ifdef
blocks that occasionally leverage this function (for now).
This issue has been closed automatically because it's labeled as 'by design'.
@joshgentry have you managed to solve this issue? I have the same problem now. And do not want to change the toolchain.
Type: Debugger
I thought this might be related to #140 but it's been a while and seems to present somewhat differently.
The issue is that, for a Win32 GUI app, compiled via GCC (MinGW), I'm having a very hard time getting debug messages to show up in the Debug Console in any readable way while debugging with GDB.
To Reproduce Here is my launch.json:
Note that with "engineLogging" set to true, the messages do show up, buried amongst many others (maybe an issue with filtering?) but they are hardly readable by being globbed together with other metadata.
Here is my tasks.json:
And here is the very simple source file, test.c, that succeeds at prompting a MessageBox and not much else:
With the above configuration, the minimal logging (due to -silent on gdb, and note that this has no effect on the output of the relevant logs) is:
With expanded logging (engineLogging=true), the following is the output:
As you can see, the messages are there, just buried and not quite what you'd expect from a debug output (ie. in Visual Studio, these messages are logged directly to the output). Here is the snippet of relevance:
I've been disappointingly scratching my head for a while at this and not sure where to go from here. Appreciate any help and happy to answer any questions.