Sign in Join

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

Mailing lists / lazarus / 2012-11

Displaying Xterm does not allow to debug

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

ik

Hello,

If I set in "Run Parameters" to display XTerm, Lazarus does not allow me to debug the code.
For example setting a break point does not have an effect (but if you do not display the terminal, then it does stop at the break point).

Is this a bug, or a feature ?

I'm using: Lazarus 1.1 r39183M FPC 2.6.0 x86_64-linux-gtk 2

Thanks,
Ido

Reply by email

Martin
to ik
ik wrote 11 lines
Hello, If I set in "Run Parameters" to display XTerm, Lazarus does not allow me to debug the code. For example setting a break point does not have an effect (but if you do not display the terminal, then it does stop at the break point). Is this a bug, or a feature ? I'm using: Lazarus 1.1 r39183M FPC 2.6.0 x86_64-linux-gtk 2

If you put xterm (or any other) in run params, then gdb gets to debug xterm, instead of your app (xterm forks a process for your app, and gdb does not follow that)

1) If it is for the console only, the IDE (on linux) has a console window (view / debug windows) It does input to, focus it and type

2) If you need to run it in xterm, you can start it outside the IDE, and attach (svn trunk only)

3) No idea if it will work, never tried it is said to be limited to some platforms only. ( http://www.delorie.com/gnu/docs/gdb/gdb_26.html ) set follow-fork-mode child
you can put it in the debugger_startup_param (the OI grid on the debugger options page) using
-ex 'set follow-fork-mode child'

4) you can run a xterm, and get the pty for it. you can enter that pty on the debugger options (oi grid) "ConsoleTty"
You should run something else in the xterm, so the shell is not reacting to keystrokes (input)
|

|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121102/c81de386/attachment.html>

Reply by email

ik
to Martin
Martin wrote 20 lines
On 02/11/2012 00:34, ik wrote: Hello, If I set in "Run Parameters" to display XTerm, Lazarus does not allow me to debug the code. For example setting a break point does not have an effect (but if you do not display the terminal, then it does stop at the break point). Is this a bug, or a feature ? I'm using: Lazarus 1.1 r39183M FPC 2.6.0 x86_64-linux-gtk 2 If you put xterm (or any other) in run params, then gdb gets to debug xterm, instead of your app (xterm forks a process for your app, and gdb does not follow that) 1) If it is for the console only, the IDE (on linux) has a console window (view / debug windows) It does input to, focus it and type

That's what I need, thanks

Show quoted text 25 lines
2) If you need to run it in xterm, you can start it outside the IDE, and attach (svn trunk only) 3) No idea if it will work, never tried it is said to be limited to some platforms only. ( http://www.delorie.com/gnu/docs/gdb/gdb_26.html ) set follow-fork-mode child you can put it in the debugger_startup_param (the OI grid on the debugger options page) using -ex 'set follow-fork-mode child' 4) you can run a xterm, and get the pty for it. you can enter that pty on the debugger options (oi grid) "ConsoleTty" You should run something else in the xterm, so the shell is not reacting to keystrokes (input) -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email