Can't debug with READLN & WRITELN ??? lazarus / 12-Debugger ---------------------------------------------------------------------- xaero · 2010-05-26 07:20 Quoteprogram demo; var     i,n:integer; begin     readln(n);     for i:=1 to n do         writeln(i);     readln; end. when I press F8 (RUN menu --> step over) ,Lazarus display a “assmbler” window!(SEE THE gif blew) how to step over "READLN(n) and debug it"? windows xp sp3 + lazarus 0.9.28.2 with all default settings ---------------------------------------------------------------------- Troodon · 2010-05-26 08:05 Is that a console application? You cannot write in program in traditional Pascal, it has to be a Lazarus/FPC console application. ---------------------------------------------------------------------- xaero · 2010-05-26 23:12 Yes ,it is a console application what's your mean? ---------------------------------------------------------------------- bobo · 2010-05-27 00:02 You should download gdb (7.0+) and set it up in Lazarus (Environment -> Options -> Debugger . ---------------------------------------------------------------------- xaero · 2010-05-27 02:16 Quote from: bobo on May 27, 2010, 02:02:38 amYou should download gdb (7.0+) and set it up in Lazarus (Environment -> Options -> Debugger . with gdb 7.1 ~~ still got the problem! ---------------------------------------------------------------------- Leledumbo · 2010-05-27 03:45 @Troodon: I don't think it would have any effect either you choose pure program or lazarus console application. @Xaero: Are you sure you're stepping over instead of stepping in? Well, I never use lazarus to debug console apps, but this shouldn't happen. ---------------------------------------------------------------------- xaero · 2010-05-27 17:28 I'm sure i press F8, not F7! Here's my steps: 1. PROJECT menu --> New Project 2. choose "custom program" 3. enter the following code, and save the project as demo.lpi: Code: [Select]program demo; var     i,n:integer; begin     readln(n);     for i:=1 to n do         writeln(i);     readln; end. 4. press f8, lazarus set a gray line under the "begin" (see gif blew), then I continue to press f8, lazarus got the error as the above mentioned. ---------------------------------------------------------------------- DSav · 2010-06-03 10:30 Have got absolutely the same problem. lazarus-0.9.28-fpc-2.2.4-win32 ---------------------------------------------------------------------- Marc · 2010-06-06 07:59 The lazarus debugger currently doesn't support cmdline applications ---------------------------------------------------------------------- ryanhaynes · 2010-09-12 01:23 I don't know if this thread is closed since it is several months back but I am having the same issue with console-app debugging Lazarus. I should note that the program written above can be debugged if the lines readln; and writeln(''); are added to the top of the console application (there may be another fix but this is what I tried). When debugging the original program (without the fix) in gdb it works fine. So this has to be a simple bug in the Lazarus IDE right? Why can't Lazarus debug a console app if gdb can? Please let me know if I'm missing something. ---------------------------------------------------------------------- JuhaManninen · 2010-09-12 07:04 With Lazarus trunk 0.9.29, on Linux, I can debug console apps without problems. Lazarus should be started from command line itself so that writeln() output goes to the same window. Juha