Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

My two wishes for the Message window of the IDE

13 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pino Zollo

Hi everybody,

-- I wish I were able to Copy (Ctl-C) a message that appears in the Message window, to be able to Paste it into a mail message to the forum.

-- I wish I had some way to write into it from my application just to show some debugging information.

Thanks

Pino

"In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Reply by email

ik
to Pino Zollo

http://ik.homelinux.org/

Pino Zollo wrote 5 lines
Hi everybody, -- I wish I were able to Copy (Ctl-C) a message that appears in the Message window, to be able to Paste it into a mail message to the forum.

Press right click on the message and choose the copy type you prefer.

Show quoted text 5 lines
-- I wish I had some way to write into it from my application just to show some debugging information.

I'm not sure that I understand.

Show quoted text 24 lines
Thanks Pino -- "In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100228/d72941dc/attachment.html>

Reply by email

Juha Manninen
to Paul Ishenin

Hi,

Same as OutputDebugString() works in delphi I suppose. Yes, I miss this too.

I never used OutputDebugString() in Delphi but I guess the main challenge is to detect if Lazarus IDE is present while the program is running. The rest should be easy.

procedure OutputDebugString(Msg: string);
begin
  if <IDE_Is_Present> then
    IDEMsgIntf.IDEMessagesWindow.AddMsg(Msg,'',-1);
end;

So, how to test it?

Regards,
Juha

Reply by email

Pino Zollo
to ik: http://ik.homelinux.org/ Press right click on the message and choose the copy type you…

Il domenica 28 febbraio 2010 10:23:17 hai scritto:

Show quoted text 9 lines
http://ik.homelinux.org/ On Sun, Feb 28, 2010 at 15:06, Pino Zollo wrote: > Hi everybody, > > -- I wish I were able to Copy (Ctl-C) a message that appears in the > Message window, to be able to Paste it into a mail message to the forum. Press right click on the message and choose the copy type you prefer.

Thanks Ido, it works ! I was trying selecting the text and then Ctl-C

Show quoted text 5 lines
> -- I wish I had some way to write into it from my application just to > show some debugging information. I'm not sure that I understand.

Sometime, while testing a program, I use to write some variable that might help me in finding the problem...

If I writeln(MyVariable) it goes to a very small terminal window in case of
enabling in the "Run Parameters"  the "Use launching application"

I just wish I were able to write those debugging information into the Message Window.

Regards

Pino

"In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Reply by email

ik
to Pino Zollo

http://ik.homelinux.org/

Pino Zollo wrote 29 lines
Il domenica 28 febbraio 2010 10:23:17 hai scritto: > http://ik.homelinux.org/ > > On Sun, Feb 28, 2010 at 15:06, Pino Zollo wrote: > > Hi everybody, > > > > -- I wish I were able to Copy (Ctl-C) a message that appears in the > > Message window, to be able to Paste it into a mail message to the forum. > > Press right click on the message and choose the copy type you prefer. Thanks Ido, it works ! I was trying selecting the text and then Ctl-C > > > -- I wish I had some way to write into it from my application just to > > show some debugging information. > > I'm not sure that I understand. Sometime, while testing a program, I use to write some variable that might help me in finding the problem... If I writeln(MyVariable) it goes to a very small terminal window in case of enabling in the "Run Parameters" the "Use launching application" I just wish I were able to write those debugging information into the Message Window.

I usually use log files for it when I can not print to the screen :)

Lazarus has a log component that allow you to set several types of messages, such as info, debug, warning etc... you can use it imho.

Show quoted text 17 lines
Regards Pino -- "In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100228/42d635c8/attachment.html>

Reply by email

Sergei Gorelkin
to Juha Manninen: I never used OutputDebugString() in Delphi but I guess the main challenge is to detect if…
Juha Manninen wrote 14 lines
I never used OutputDebugString() in Delphi but I guess the main challenge is to detect if Lazarus IDE is present while the program is running. The rest should be easy. procedure OutputDebugString(Msg: string); begin if <IDE_Is_Present> then IDEMsgIntf.IDEMessagesWindow.AddMsg(Msg,'',-1); end; So, how to test it?

There should be no need to test for the IDE. Just write messages to some named IPC channel, and have the IDE (or whatever other "log viewer" application) listen on the other side. IIRC this is how OutputDebugString works, it uses a named pipe for communication.

Sergei

Reply by email

dmitry boyarintsev
to Sergei Gorelkin
Sergei Gorelkin wrote
There should be no need to test for the IDE. Just write messages to some named IPC channel, and have the IDE (or whatever other "log viewer" application) listen on the other side. IIRC this is how OutputDebugString works, it uses a named pipe for communication.

Is there a ready to use component for that?

thanks,
dmitry

Reply by email

Sergei Gorelkin
to dmitry boyarintsev

dmitry boyarintsev ?????:

Show quoted text 9 lines
On Sun, Feb 28, 2010 at 8:53 PM, Sergei Gorelkin wrote: > There should be no need to test for the IDE. Just write messages to some > named IPC channel, and have the IDE (or whatever other "log viewer" > application) listen on the other side. IIRC this is how OutputDebugString > works, it uses a named pipe for communication. Is there a ready to use component for that?

Well, there is simpleipc unit in fcl-process unit (with client and server components), but no idea whether it can be used for the intended purpose without modifications.

Sergei

Reply by email

Flávio Etrusco
to Sergei Gorelkin
Sergei Gorelkin wrote 17 lines
dmitry boyarintsev ?????: > > On Sun, Feb 28, 2010 at 8:53 PM, Sergei Gorelkin > wrote: >> >> There should be no need to test for the IDE. Just write messages to some >> named IPC channel, and have the IDE (or whatever other "log viewer" >> application) listen on the other side. IIRC this is how OutputDebugString >> works, it uses a named pipe for communication. > > Is there a ready to use component for that? > Well, there is simpleipc unit in fcl-process unit (with client and server components), but no idea whether it can be used for the intended purpose without modifications. Sergei

Not to state the obvious but... First one/we need to decide what the function will be called, OutputDebugString or DebugLn. Then decide what LCL unit should it be in. Then make an inline function which would just check whether a global function-typed var is set and a call it, for the IDE to hook.
Then we think about IPC and such...

-Fl?vio

Reply by email

Paul Ishenin
to dmitry boyarintsev: On Sun, Feb 28, 2010 at 8:53 PM, Sergei Gorelkin Is there a ready to use component for…
dmitry boyarintsev wrote 10 lines
On Sun, Feb 28, 2010 at 8:53 PM, Sergei Gorelkin wrote: > There should be no need to test for the IDE. Just write messages to some > named IPC channel, and have the IDE (or whatever other "log viewer" > application) listen on the other side. IIRC this is how OutputDebugString > works, it uses a named pipe for communication. > Is there a ready to use component for that?

We can use a piece of lazarus\tools\debugserver code to do this.

Best regards,
Paul Ishenin.

Reply by email

Hans-Peter Diettrich
to Sergei Gorelkin: There should be no need to test for the IDE. Just write messages to some named IPC…
There should be no need to test for the IDE. Just write messages to some named IPC channel, and have the IDE (or whatever other "log viewer" application) listen on the other side. IIRC this is how OutputDebugString works, it uses a named pipe for communication.

I just remember a (Delphi) DebugHook variable, that might be useful. While a Windows debugger should handle OutputDebugString messages, a different handling may be required on other platforms. IIRC FPC uses gdb, that interacts somehow with the IDE.

DoDi

Reply by email

Vincent Snijders
to Flávio Etrusco: On Sun, Feb 28, 2010 at 7:39 PM, Sergei Gorelkin Not to state the obvious but... First…
Fl?vio Etrusco wrote
Not to state the obvious but... First one/we need to decide what the function will be called, OutputDebugString or DebugLn. Then decide

Definitely not DebugLn, that is for output to the console.

what LCL unit should it be in. Then make an inline function which would just check whether a global function-typed var is set and a call it, for the IDE to hook.

The IDE is in a different process, so it cannot use the global var (without using some kind of IPC, for example shared memory, end even then ...).

Then we think about IPC and such...

Vincent

Reply by email