Sign in Join

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

Mailing lists / lazarus / 2003-01

Debug server available.

7 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Mattias Gaertner: On Thu, 2 Jan 2003 16:17:43 +0100 (CET) :) I think, a remote logger is a very useful tool…
Show quoted text 61 lines
On Fri, 3 Jan 2003, Mattias Gaertner wrote: > On Thu, 2 Jan 2003 16:17:43 +0100 (CET) > wrote: > > > [...] > > The debug server catches the messages sent by the dbugintf unit, and > > displays them in a nice way. > > [...] > > > > I made such a debugserver for the kylix book I co-authored, and now > > I've implemented and extended it for use with Free Pascal. > > > > There are 2 versions: > > - Console or system log. > > - GTK version (currently uses fpgtk) > > Displays all messages nicely in a list, as the original 'gdebug' > > program.(there are various options which can be set) > > > > Currently, it works on Linux, and it can use a unix domain socket, > > or a TCP/IP socket. (so you can log to a debugserver on a separate > > host) > > > > [...] > > Question to the Lazarus team: > > Currently, there are 2 server front-ends available: > > - console (also can use linux system log) > > - GTK (uses a thin GTK OOP wrapper: fpgtk) > > The server mechanism is available in a separate unit, so it is easy to > > write a new server which handles the messages differently. > > > > I think it would be a nice idea if someone would look at the GTK > > interface(it is really small) and produce a Lazarus interface. The > > GUI code is written in such a way that you will have almost no changes > > to do. > > > > I think it would even be possible to include the debug server in the > > lazarus IDE itself, if properly coded. > > > > A win32 version is in the works, I still need to port the ssockets > > code to windows. AFter that it should work with just a recompile. > > > > Comments, suggestions etc. always welcome. > > :) > I think, a remote logger is a very useful tool and a frontend should be > added to the IDE. It should be easy to implement, if the server is not > polling. It is polling, but that shouldn't matter. Look at the GTK frontend I wrote, there should be no problem implementing it for Lazarus. > Currently I'm busy, so I can't say when I will do it. Any help is > welcome. > > Michael, can you adapt it for fpc 1.1? It should work with 1.1 as well as 1.0, since it only uses FCL and some packages.

And unit 'Linux'.

Mattias

Reply by email

Unknown author

Hi,

Some of you will maybe be familiar with the 'gexperts' package for Delphi. It contains a 'debug server', with a unit 'dbugintf' to communicate with it.

The idea is that, to debug your programs, you include the 'dbugintf' unit
in the unit you wish to debug, and statements like
{$ifdef debug}
  senddebug('Passed here') ;
{$endif}
can be put in various locations. (more methods exist, to send variable values etc)

The debug server catches the messages sent by the dbugintf unit, and displays them in a nice way.

This is very useful for debugging GUI code: A normal debugger will interfere with the GUI events (focus shifts etc) and so messes up any attempts to debug code. Also daemons (servlets) etc. can use this unit to do debugging.

I made such a debugserver for the kylix book I co-authored, and now I've implemented and extended it for use with Free Pascal.

There are 2 versions:
- Console or system log.
- GTK version (currently uses fpgtk)
Displays all messages nicely in a list, as the original 'gdebug' program. (there are various options which can be set)

Currently, it works on Linux, and it can use a unix domain socket, or a TCP/IP socket. (so you can log to a debugserver on a separate host)

It seems to work nicely. I did a speed test (10000 messages in a tight loop) And all works ok. I've committed the lot under utils/debugsvr.

Question to the Lazarus team:
Currently, there are 2 server front-ends available:
- console (also can use linux system log)
- GTK (uses a thin GTK OOP wrapper: fpgtk)
The server mechanism is available in a separate unit, so it is easy to write a new server which handles the messages differently.

I think it would be a nice idea if someone would look at the GTK interface (it is really small) and produce a Lazarus interface. The GUI code is written in such a way that you will have almost no changes to do.

I think it would even be possible to include the debug server in the lazarus IDE itself, if properly coded.

A win32 version is in the works, I still need to port the ssockets code to windows. AFter that it should work with just a recompile.

Comments, suggestions etc. always welcome.

Michael.

Reply by email

Unknown author
to Mattias Gaertner: On Thu, 2 Jan 2003 16:17:43 +0100 (CET) :) I think, a remote logger is a very useful tool…
Mattias Gaertner wrote 63 lines
On Thu, 2 Jan 2003 16:17:43 +0100 (CET) wrote: > Hi, > > Some of you will maybe be familiar with the 'gexperts' package for Delphi. > It contains a 'debug server', with a unit 'dbugintf' to communicate with > it. > > The idea is that, to debug your programs, you include the 'dbugintf' unit > in the unit you wish to debug, and statements like > {$ifdef debug} > senddebug('Passed here') ; > {$endif} > can be put in various locations. (more methods exist, to send variable > values etc) > > The debug server catches the messages sent by the dbugintf unit, and > displays them in a nice way. > > This is very useful for debugging GUI code: A normal debugger will > interfere with the GUI events (focus shifts etc) and so messes up any > attempts to debug code. Also daemons (servlets) etc. can use this unit to > do debugging. > > I made such a debugserver for the kylix book I co-authored, and now I've > implemented and extended it for use with Free Pascal. > > There are 2 versions: > - Console or system log. > - GTK version (currently uses fpgtk) > Displays all messages nicely in a list, as the original 'gdebug' > program.(there are various options which can be set) > > Currently, it works on Linux, and it can use a unix domain socket, > or a TCP/IP socket. (so you can log to a debugserver on a separate host) > > It seems to work nicely. I did a speed test (10000 messages in a tight > loop) And all works ok. I've committed the lot under utils/debugsvr. > > Question to the Lazarus team: > Currently, there are 2 server front-ends available: > - console (also can use linux system log) > - GTK (uses a thin GTK OOP wrapper: fpgtk) > The server mechanism is available in a separate unit, so it is easy to > write a new server which handles the messages differently. > > I think it would be a nice idea if someone would look at the GTK interface > (it is really small) and produce a Lazarus interface. The GUI code is > written in such a way that you will have almost no changes to do. > > I think it would even be possible to include the debug server in the > lazarus IDE itself, if properly coded. > > A win32 version is in the works, I still need to port the ssockets code to > windows. AFter that it should work with just a recompile. > > Comments, suggestions etc. always welcome. :) I think, a remote logger is a very useful tool and a frontend should be added to the IDE. It should be easy to implement, if the server is not polling.

It is polling, but that shouldn't matter. Look at the GTK frontend I wrote, there should be no problem implementing it for Lazarus.

Currently I'm busy, so I can't say when I will do it. Any help is welcome. Michael, can you adapt it for fpc 1.1?

It should work with 1.1 as well as 1.0, since it only uses FCL and some packages.

Michael.

Reply by email

Mattias Gaertner
to Unknown author: Some of you will maybe be familiar with the 'gexperts' package for Delphi. It contains a…
Show quoted text 55 lines
Hi, Some of you will maybe be familiar with the 'gexperts' package for Delphi. It contains a 'debug server', with a unit 'dbugintf' to communicate with it. The idea is that, to debug your programs, you include the 'dbugintf' unit in the unit you wish to debug, and statements like {$ifdef debug} senddebug('Passed here') ; {$endif} can be put in various locations. (more methods exist, to send variable values etc) The debug server catches the messages sent by the dbugintf unit, and displays them in a nice way. This is very useful for debugging GUI code: A normal debugger will interfere with the GUI events (focus shifts etc) and so messes up any attempts to debug code. Also daemons (servlets) etc. can use this unit to do debugging. I made such a debugserver for the kylix book I co-authored, and now I've implemented and extended it for use with Free Pascal. There are 2 versions: - Console or system log. - GTK version (currently uses fpgtk) Displays all messages nicely in a list, as the original 'gdebug' program.(there are various options which can be set) Currently, it works on Linux, and it can use a unix domain socket, or a TCP/IP socket. (so you can log to a debugserver on a separate host) It seems to work nicely. I did a speed test (10000 messages in a tight loop) And all works ok. I've committed the lot under utils/debugsvr. Question to the Lazarus team: Currently, there are 2 server front-ends available: - console (also can use linux system log) - GTK (uses a thin GTK OOP wrapper: fpgtk) The server mechanism is available in a separate unit, so it is easy to write a new server which handles the messages differently. I think it would be a nice idea if someone would look at the GTK interface (it is really small) and produce a Lazarus interface. The GUI code is written in such a way that you will have almost no changes to do. I think it would even be possible to include the debug server in the lazarus IDE itself, if properly coded. A win32 version is in the works, I still need to port the ssockets code to windows. AFter that it should work with just a recompile. Comments, suggestions etc. always welcome.

:)
I think, a remote logger is a very useful tool and a frontend should be added to the IDE. It should be easy to implement, if the server is not polling. Currently I'm busy, so I can't say when I will do it. Any help is welcome.

Michael, can you adapt it for fpc 1.1?

Mattias

Reply by email

Marco van de Voort
to Unknown author: This can be changed easily, but currently a lot of changes are done in the Unix/Linux…
Show quoted text 13 lines
On Fri, 3 Jan 2003, Mattias Gaertner wrote: > > > > > > Michael, can you adapt it for fpc 1.1? > > > > It should work with 1.1 as well as 1.0, since it only uses FCL and some > > packages. > > And unit 'Linux'. This can be changed easily, but currently a lot of changes are done in the Unix/Linux RTL, and I prefer to wait with changing this, but normally, the linux unit should work with 1.1 as well ?

Only for 1.0.x compilability of 1.1 IIRC.

One can also start using/testing "baseunix", to be independant of unix/linux and future changes (but that requires in code changes also, because of different prefixes etc, but at least it is much closer to being definitive).

I updated the makefile yesterday evening.

Reply by email

Unknown author
to Mattias Gaertner: On Fri, 3 Jan 2003 17:02:13 +0100 (CET) And unit 'Linux'. Mattias
Mattias Gaertner wrote 66 lines
On Fri, 3 Jan 2003 17:02:13 +0100 (CET) wrote: > > > On Fri, 3 Jan 2003, Mattias Gaertner wrote: > > > On Thu, 2 Jan 2003 16:17:43 +0100 (CET) > > wrote: > > > > > [...] > > > The debug server catches the messages sent by the dbugintf unit, and > > > displays them in a nice way. > > > [...] > > > > > > I made such a debugserver for the kylix book I co-authored, and now > > > I've implemented and extended it for use with Free Pascal. > > > > > > There are 2 versions: > > > - Console or system log. > > > - GTK version (currently uses fpgtk) > > > Displays all messages nicely in a list, as the original 'gdebug' > > > program.(there are various options which can be set) > > > > > > Currently, it works on Linux, and it can use a unix domain socket, > > > or a TCP/IP socket. (so you can log to a debugserver on a separate > > > host) > > > > > > [...] > > > Question to the Lazarus team: > > > Currently, there are 2 server front-ends available: > > > - console (also can use linux system log) > > > - GTK (uses a thin GTK OOP wrapper: fpgtk) > > > The server mechanism is available in a separate unit, so it is easy to > > > write a new server which handles the messages differently. > > > > > > I think it would be a nice idea if someone would look at the GTK > > > interface(it is really small) and produce a Lazarus interface. The > > > GUI code is written in such a way that you will have almost no changes > > > to do. > > > > > > I think it would even be possible to include the debug server in the > > > lazarus IDE itself, if properly coded. > > > > > > A win32 version is in the works, I still need to port the ssockets > > > code to windows. AFter that it should work with just a recompile. > > > > > > Comments, suggestions etc. always welcome. > > > > :) > > I think, a remote logger is a very useful tool and a frontend should be > > added to the IDE. It should be easy to implement, if the server is not > > polling. > > It is polling, but that shouldn't matter. Look at the GTK frontend I > wrote, there should be no problem implementing it for Lazarus. > > > Currently I'm busy, so I can't say when I will do it. Any help is > > welcome. > > > > Michael, can you adapt it for fpc 1.1? > > It should work with 1.1 as well as 1.0, since it only uses FCL and some > packages. And unit 'Linux'.

This can be changed easily, but currently a lot of changes are done in the Unix/Linux RTL, and I prefer to wait with changing this, but normally, the linux unit should work with 1.1 as well ?

Michael

Reply by email