Recent

Author Topic: How do I really disable the debugger "Timeout" window?  (Read 8982 times)

CephasAtheos

  • New Member
  • *
  • Posts: 35
How do I really disable the debugger "Timeout" window?
« on: September 27, 2012, 11:29:41 am »
G'day everyone,

I've been trying to find a way to disable the debugger timeout window, because IT'S ANNOYING.

Unfortunately, setting the "Warn on Timeout" to FALSE, in Options|Debugger|General, doesn't actually work, on Lazarus 1.0RC1 or 1.1. This is true for all debugger types (dwarf, gdb, etc).

It's really, really annoying the hell out of me at the moment (especially because of the behaviour not understanding comments and irrelevant text, as I posted in this forum a couple of hours ago).

Is there another setting in the IDE that I can use to disable it? Alternatively, can someone point me at the code where the debugger checks the state of the Warn flag? I think I should be able to fix it and get it posted back into the repo for everyone else's benefit, which would be a nice way to end the day!

Thanks for any suggestions or helpful comments!

Cheers,
Pete
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: How do I really disable the debugger "Timeout" window?
« Reply #1 on: September 27, 2012, 12:54:40 pm »

May be this case could be related with your problem.
Look at this bug report.
0021653
Regards

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: How do I really disable the debugger "Timeout" window?
« Reply #2 on: September 27, 2012, 02:08:19 pm »
Unfortunately, setting the "Warn on Timeout" to FALSE, in Options|Debugger|General, doesn't actually work, on Lazarus 1.0RC1 or 1.1. This is true for all debugger types (dwarf, gdb, etc).

You mean, it returns to "True", if you close and re-open the option dialog (or restart the IDE? Then see the link from IndianaJones.

Or modify your EnvironementsOptions.xml (folder .lazarus in your home dir)
Code: [Select]
<CONFIG>
  <EnvironmentOptions>
    <Debugger Class="TGDBMIDebugger" EventLogLineLimit="100">
      <ClassTGDBMIDebugger>
        <Properties WarnOnTimeOut="False"/>
      </ClassTGDBMIDebugger>
    </Debugger>
  </EnvironmentOptions>
</CONFIG>

You may also et the value for timeout to 50 (which is the lowest positive value allowed).

See here for background info (well the wiki needs to bo updated a bit...)
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Debug_session_freezes


The option dialog is in ide/frames/*

The debugger code is in \debugger\gdbmidebugger.pp.
Search for TGDBMIDebuggerProperties
    property WarnOnTimeOut: Boolean  read FWarnOnTimeOut write SetWarnOnTimeOut;

The value is loaded/saved via the same streaming method used by forms (lfm), except, the back-end writes xml.


CephasAtheos

  • New Member
  • *
  • Posts: 35
Re: How do I really disable the debugger "Timeout" window?
« Reply #3 on: September 27, 2012, 02:26:03 pm »

May be this case could be related with your problem.
Look at this bug report.
0021653
Regards
Thanks, Indy! :)

Unfortunately, in my case the grid is retaining the values fine - the debugger is actually ignoring the flag. If I set it to "False", close the dialog, shut down Lazarus, restart, open the dialog, it's still set to false - but the darn timeout window keeps popping up!

Is your problem (#21653) still a problem for you, or have you upgraded OS X? I'm running 10.7.4 right now (well, it's what shipped with the Mac!), I'm wondering if that could be related?

Thanks for the suggestion, though!
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

CephasAtheos

  • New Member
  • *
  • Posts: 35
Re: How do I really disable the debugger "Timeout" window?
« Reply #4 on: September 27, 2012, 02:30:31 pm »
You mean, it returns to "True", if you close and re-open the option dialog (or restart the IDE? Then see the link from IndianaJones.
No, unfortunately (or fortunately?? :))
Quote
Or modify your EnvironementsOptions.xml (folder .lazarus in your home dir)
8X snip X8
Thank you so much, that's brilliant information to have! And a lot of it, too! ;)

I'll double-check the xml as you suggested (I assume the debugger reads that from the file on disk, which the IDE option form writes out, is that that more or less correct?), then if that leads nowhere, I'll have a peek at the real live code... I'm not promising anything, but I'd love to be able to do something positive. It's going to be a long night for me again, so here goes... (Time does fly when you're having fun!)
Thank you so much for your help. You guys are amazing.
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: How do I really disable the debugger "Timeout" window?
« Reply #5 on: September 27, 2012, 02:43:02 pm »
EnvironementsOptions.xml must be changed, while the IDE is NOT running.
Then it should show in the options.

From your roply I assume, the Options does show:
Code: [Select]
   "Warn on Timeout" = FALSE
If so, you can also supply log files: http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
Maybe there is something I can spot.

CephasAtheos

  • New Member
  • *
  • Posts: 35
Re: How do I really disable the debugger "Timeout" window?
« Reply #6 on: September 28, 2012, 02:37:54 am »
Martin, that's correct, I see "FALSE" in the WarnOnTimeout field, and in EnvironmentOptions.xml on disk.

I've actually tried a couple of times to start with logging on, but got lost with a build failure a couple of days ago. I'll retry it now.

FYI, where should I put the extra debug options when rebuilding the IDE (as per the document you referred to)? If I add it to the make command line, I get an error :
Code: [Select]
make: unrecognized option `--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO'
However, for now I'll try starting lazarus with debugging on, at least for the IDE startup, since I can't rebuild with the extra options.

Sorry about not knowing where to put this information.
-Pete
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

CephasAtheos

  • New Member
  • *
  • Posts: 35
[SOLVED]Re: How do I really disable the debugger "Timeout" window?
« Reply #7 on: September 28, 2012, 03:36:13 am »
OK, I'm learning more every day...

I noticed for the first time the "Debug" option (next to the "Verbose" option) in Tools|Configure Lazarus Build... That's to say, I saw it before, but for some reason I didn't think to turn it on:o %) :-[

So this appears to have "solved" my "problem". The warning dialog now respects the setting of the Warn flag, and I can now see some useful debugging info in my (fancy new date-and-timestamped) log files.

The debugger still shows <Error> for many variables (particularly non-core-library function calls and comments, but it does now return useful values for commented words, so things are looking up!

And I still can't run the project within the IDE if the project has an icon assigned, but that's a different kettle of fish.

I'm so sorry I didn't think to check that option before... I must have seen that option form at least forty times in the past week, and it just didn't click that by checking those options, I could enable and disable those two features. I just assumed that it was the '-vXXX' options in the project options form that was enabling all the verbose stuff.

Still, it's been really great learning about the way the debugger works, and some of the strange interactions that happen when unexpectedly stupid configurations are tried!

Thanks for pulling me in the right direction, and I'm so sorry I totally missed the IDE build debug setting.

Cheers,
Sheepish Pete
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: How do I really disable the debugger "Timeout" window?
« Reply #8 on: September 28, 2012, 05:08:14 am »
Not sure where to put it, when using make. I think
Code: [Select]
make -OPT="..."
But I always use the "Build" in the "Tools" menu.

I do recommend to install the package IdeLazLogger. (Available since Laz 1.0) Then you do not need the defines. And you do not need the commandline (--debug=enable / ...-log).
There will be a "Logging" entry in the tools menu, and you can set the logfile, and select the items to log...

Quote
I noticed for the first time the "Debug" option (next to the "Verbose" option) in Tools|Configure Lazarus Build... That's to say, I saw it before, but for some reason I didn't think to turn it on!  :o %) :-[

So this appears to have "solved" my "problem". The warning dialog now respects the setting of the Warn flag, and I can now see some useful debugging info in my (fancy new date-and-timestamped) log files.

That is very odd... his has nothing to do with each other. The "DEBUG" define simple enables some logging statements. And they aren't even in the debugger...

Maybe a clean recompile did the trick.
I know with older FPC there was the case that a quick compile (only changed files) sometimes lead to bad executables. Though I never had it with 2.6.0 (and as far as I know, it should be fixed)

Quote
The debugger still shows <Error> for many variables (particularly non-core-library function calls and comments
Function calls can not be evaluated. Some versions of gdb do "sizeof" internally, but I do not know if the one that comes with Mac does. "length" s not avail at all.

See also the info on "properties" on the wiki (earlier link I posted)

Code: [Select]
And I still can't run the project within the IDE if the project has an icon assigned, but that's a different kettle of fish.Very strange. Send a log file.


CephasAtheos

  • New Member
  • *
  • Posts: 35
Re: How do I really disable the debugger "Timeout" window?
« Reply #9 on: September 28, 2012, 05:16:28 am »
Code: [Select]
[quote author=Martin_fr link=topic=18374.msg103696#msg103696 date=1348801694]
That is very odd... his has nothing to do with each other. The "DEBUG" define simple enables some logging statements. And they aren't even in the debugger...

Maybe a clean recompile did the trick.
/quote]
I don't *think* that's what it was. The reason I say that is, if I uncheck that debug define and rebuild the IDE, I get the same behaviour as before - the timeout popup ignores the flag and pops up all the time. Then, when I define DEBUG again, the popup starts behaving correctly! So somewhere there is a link between the two settings! Maybe it's a streaming problem? (HA! Listen to me, will you..."streaming problem" hehehehe  8)) I really have no idea, but I will look into it to see if anything sticks out.

[quote]And I still can't run the project within the IDE if the project has an icon assigned, but that's a different kettle of fish.
Very strange. Send a log file.
[/quote]
I'll do just that. We have friends just arrived and I have to schmooze for a couple of hours.... :)

But thanks again for all the fine information!
Cheers,
Pete
Data isn't information. Information isn't knowledge. Knowledge isn't wisdom.

 

TinyPortal © 2005-2018