Questions tagged [outputdebugstring]

OutputDebugString function is for sending a text to the attached debugger, if any.

Use the function OutputDebugString to send the text to the attached debugger, if there is any. Without the debugger attached, this function does nothing. Debuggers like Visual Studio, WinDBG, Dependency Walker, DebugView can be used to see the output of this function.

This function is mainly used to debug your own program. It's very similar to writing text to screen (printf, cout etc) or to a log file to see what's the program doing.

OutputDebugString is actually a macro, that maps to one of the core functions: OutputDebugStringA or OutputDebugStringW

38 questions
26
votes
5 answers

Can output from OutputDebugString be viewed in Visual Studio's output window?

I am using C# and Visual Studio 2010. When I use OutputDebugString to write debug information, should it show up in the output window? I can see the output from OutputDebugString in DebugView, but I thought I would see it in Visual Studio's Output…
wageoghe
  • 27,390
  • 13
  • 88
  • 116
16
votes
3 answers

In Delphi, is OutputDebugString thread safe?

Is OutputDebugString(PAnsiChar('')); thread safe? I/we have been using it in threads for debugging, and it never occurred to me if I should be doing it a different way. (Delphi 7)
Christopher Chase
  • 2,840
  • 6
  • 36
  • 57
13
votes
5 answers

How to view output of OutputDebugString?

I want to use OutputDebugString() in my application and then have the option to show it in a separate viewer when the application is deployed in the field. That is to say, I don't want to have to change a flag and rebuild my .exe to turn debugging…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
12
votes
1 answer

How can I receive OutputDebugString from a service?

I'm trying to catch all OutputDebugString messages (including those from services) using the following code. It worked fine until I migrated to Windows 7. The problem is that since Windows Vista services are running in the low level Session #0, some…
user532231
8
votes
4 answers

How can I keep a large amount of OutputDebugString() calls from degrading my application in the Delphi 6 IDE?

This has happened to me on more than one occasion and has led to many lost hours chasing a ghost. As typical, when I am debugging some really difficult timing-related code I start adding tons of OutputDebugString() calls, so I can get a good picture…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
8
votes
3 answers

OutputDebugString() does not work on Windows 7x64

My program works great with windows xp. I am trying to add some more functionality and using OutputDebugString() to show some debug information. works flawlessly on XP. Now when i want to use the same program on windows 7x64. I dont see any output…
vrrathod
  • 1,230
  • 2
  • 18
  • 28
8
votes
2 answers

Error: Undeclared identifier: 'OutputDebugString'

I use OutputDebugString in my Delphi Code, but I receive the error: Error: Undeclared identifier: 'OutputDebugString' Which package is this OutputDebugString in?
spspli
  • 3,128
  • 11
  • 48
  • 75
8
votes
1 answer

OutputDebugString() in console

I am using a third party library that uses the function OutputDebugString(), and when reading the MSDN documentation it seems to indicate that this is for printing to the debugger. But that is inconvenient in my case, is there a way to read this…
Zitrax
  • 19,036
  • 20
  • 88
  • 110
6
votes
1 answer

OutputDebugString() with Delphi for MacOS

Is there an NSLog declaration in the Delphi OSX units. I failed to find a substitude for OutputDebugString in a Firemonkey application. The final solution looks like this: /// /// Output debug string. Output debug string can be seen in…
Gad D Lord
  • 6,620
  • 12
  • 60
  • 106
5
votes
2 answers

Debugging OutputDebugString calls in Delphi

I've some "rogue" OutputDebugString call in my application which prints out "T", but I can't just locate it. Is it possible somehow to set breakpoint on OutputDebugString -function and see where it is called from? I'm using Delphi 2009.
Harriv
  • 6,029
  • 6
  • 44
  • 76
5
votes
5 answers

Bypass OutputDebugString in Delphi 7?

I'm wondering if it's possible to bypass the OutputDebugString? I'd like the OutputDebugString output showing up in DebugView and not in the internal Delphi Event Viewer window. But i can't find a way to tell Delphi not to swallow the…
devployment
  • 2,121
  • 1
  • 22
  • 33
4
votes
1 answer

Is there a Unicode alternative to OutputDebugString?

OutputDebugString() is native ASCII, which means it convert the input Unicode string to local string before call the ASCII version OutputDebugStringA(). Is there any alternative to OutputDebugString() which supports Unicode?
Jichao
  • 40,341
  • 47
  • 125
  • 198
4
votes
1 answer

C++ OutputDebugStringW with newline

I want to attach a new line to the OutputDebugStringW. OutputDebugStringW(Item.pItem); pItem is a LPCWSTR, not a wstring, so I could not directly add new line by saying + "/n". Can somebody help?
tmighty
  • 10,734
  • 21
  • 104
  • 218
3
votes
4 answers

OutputDebugString + DebugView = not tabs!

I am dumping \t delimited data using using OutputDebugString and then use ex-Sysinternals DebugView to capture it. The problem is that all the data in DebugView appear to be space delimited, hence I need to perfrorm CTRL+H "\x20" "t" to replace…
Steve
  • 551
  • 2
  • 8
  • 18
2
votes
0 answers

How to view System.Diagnostics.Trace.WriteLine output in DbgView?

I have an ASP.net web-site hosted on IIS, and the code calls: System.Diagnostics.Trace.WriteLine("test"); Reminder: You use Trace, rather than Debug, because Debug requires a debug build. Whereas Trace always works1 So on the production web-server,…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
2 3