* * *

Author Topic: Debugger stopped tracing  (Read 812 times)

daringly

  • New member
  • *
  • Posts: 30
Debugger stopped tracing
« on: October 19, 2016, 06:15:23 pm »
For months I have used the Lazarus debugger with no problems. Today, it stopped, amd I am baffled. I have read most of the threads I can find on it, and don't see any obvious causes of this.

I can compile, and run a program with F9. If I try F7 or F8 to step, nothing happens (but F9 will still work after trying f7/F8).

To isolate the issue, I went with the shortest program I could try:

program test1;

begin
  writeln('hello world');
  readln;

end. 

Any suggestions on getting Step to work in debug?

howardpc

  • Hero Member
  • *****
  • Posts: 2117
Re: Debugger stopped tracing
« Reply #1 on: October 19, 2016, 06:22:59 pm »
Double check that in your project options you have checked "Generate debugging info for GDB", that you don't have any optimizations, and that there is no smartlinking, and that gdb is in your OS Path.

molly

  • Hero Member
  • *****
  • Posts: 1566
Re: Debugger stopped tracing
« Reply #2 on: October 19, 2016, 06:26:59 pm »
In addition to what howardpc wrote and perhaps a stupid remark, have you actually set a breakpoint ? Stepping into a program without so displays the assembler window (which might be hidden for you).

wp

  • Hero Member
  • *****
  • Posts: 3450
Re: Debugger stopped tracing
« Reply #3 on: October 19, 2016, 06:36:23 pm »
Some time ago I switched to gdb v7.9 and sporadically saw these issues as well. Then I returned to the gdb version that comes with the Laz3.0 installation (I don't know the version number) and everything is fine again.
Lazarus trunk / fpc 3.0.0 / Win32

daringly

  • New member
  • *
  • Posts: 30
Re: Debugger stopped tracing
« Reply #4 on: October 19, 2016, 06:39:23 pm »
Double check that in your project options you have checked "Generate debugging info for GDB", that you don't have any optimizations, and that there is no smartlinking, and that gdb is in your OS Path.

"Generate debugging info for DGB" is still checked."
The default was optimization 1, and I tried 0 as well.
Smart linkable is not checked.
The gdb path is unchanged: $(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe


daringly

  • New member
  • *
  • Posts: 30
Re: Debugger stopped tracing
« Reply #5 on: October 19, 2016, 06:47:22 pm »
Some time ago I switched to gdb v7.9 and sporadically saw these issues as well. Then I returned to the gdb version that comes with the Laz3.0 installation (I don't know the version number) and everything is fine again.

My version of gdb is 7.3.50, which was included in the 2016 Lazarus download.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4219
    • wiki
Re: Debugger stopped tracing
« Reply #6 on: October 19, 2016, 07:51:08 pm »
first of all: windows ??
which version of windows? 64 or 32 bits?

Lazarus 32/64 bits?

Then do you have an antivirus? sometimes they cause issues. If you can try to temp disable it, or put lazarus, gdb and your newly compiled project on the exception list.

----------------------------------
You say F7/F8 do not work....

Unless your app is a console app, you need to start with F9 and reach a breakpoint first (F7/F8 would (if anything) take you somewhere into LCL or RTL....)

Next, if you set a breakpoint, and then run with F9, does the breakpoint stay in its red color, or does it get another color (orange-ish)?

-----------------------------------
You can try to switch between stabs and dwarf (project options / debug info / their is a dropdown)

If nothing helps, the provide a logfile
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session




daringly

  • New member
  • *
  • Posts: 30
Re: Debugger stopped tracing
« Reply #7 on: October 20, 2016, 04:12:37 pm »
Windows 7, 64-bit.
Lazarus 1.6, fpc 3.0.0, x86_64-win64-win32/win64

I am using eset.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus