Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2018, 07:07 PM
jocaro jocaro is offline
Junior Member
 
Join Date: Mar 2012
Posts: 28
Default Sending messages within the Delphi IDE

Hello

While working in the IDE, is it possible to include in the application that is developed, test messages that are displayed in any window of the IDE itself?

I am referring to something similar to OutputDebugString, but that does not require the application to run in debug mode.

Thank you for your attention. A greeting
Reply With Quote
  #2  
Old 09-25-2018, 07:13 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,307
Default

Your assumption on the OutputDebugString might be inaccurate. I always thought it depends on the application compiled in debug or release mode. And by default it's compiled in debug mode...

You could do something like:
Code:
if IsDebuggerPresent then OutputDebugString('asdfas')
Reply With Quote
  #3  
Old 09-25-2018, 11:18 AM
jocaro jocaro is offline
Junior Member
 
Join Date: Mar 2012
Posts: 28
Default

Hello.

Maybe my explanation is not clear.

Run application, without debugging (build configuration->release), with its own message code lines, from the Delphi IDE.

These messages can be seen in an area of the IDE.

I'm thinking of something similar to writeln, sendmessage, etc.

Is that possible?.

Thanks.
Reply With Quote
  #4  
Old 09-25-2018, 12:40 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,307
Default

I would've assumed that OutputDebugString already had this validation, but you could also do:
Code:
{$IFDEF DEBUG}OutputDebugString('asdfas');{$ENDIF}
Now if you compile in release you shouldn't see the message
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 07:51 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.