Sign in Join

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

Mailing lists / lazarus / 2015-02

Debugger Warning

20 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Marcos Douglas

Hi,
I updated my Lazarus and I noted a new behavior: if I compile any program with the option Debugging>Generate debugging info unchecked, when I run a message is showed:
"The debugger was unable to set all breakpoints during initialization. You may with to check if all sources were compiled with debug-info. Press OK to ignore this and continue"

So, why I run with no debug-info? All Test programs, using FPCUnit Test I run without this info because I do not want the program stop if an exception is raised -- FPCUnit will catch -- but I need to know if there are memory leaks.

How I disable this message?

Lazarus 1.5 r47948M FPC 2.6.5 i386-win32-win32/win64

Thanks,
Marcos Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150223/a34d8921/attachment.html>

Reply by email

martin
to Marcos Douglas
Marcos Douglas wrote 17 lines
Hi, I updated my Lazarus and I noted a new behavior: if I compile any program with the option Debugging>Generate debugging info unchecked, when I run a message is showed: "The debugger was unable to set all breakpoints during initialization. You may with to check if all sources were compiled with debug-info. Press OK to ignore this and continue" So, why I run with no debug-info? All Test programs, using FPCUnit Test I run without this info because I do not want the program stop if an exception is raised -- FPCUnit will catch -- but I need to know if there are memory leaks. How I disable this message? Lazarus 1.5 r47948M FPC 2.6.5 i386-win32-win32/win64

there is an option in the debugger properties (the property grid in the debugger options)

Just to be sure: This is about your app (intentionally) not having FPC_RAISEEXCEPTION?
There is no other breakpoint (check in breakpoints window of menu "View" "Debugger windows")?

I guess this feature needs fine tuning. And maybe a "run without debugger" command.

Reply by email

Marcos Douglas
to martin
martin wrote 22 lines
On 23/02/15 14:37, Marcos Douglas wrote: > > Hi, > I updated my Lazarus and I noted a new behavior: if I compile any program > with the option Debugging>Generate debugging info unchecked, when I run a > message is showed: > "The debugger was unable to set all breakpoints during initialization. You > may with to check if all sources were compiled with debug-info. Press OK to > ignore this and continue" > > So, why I run with no debug-info? All Test programs, using FPCUnit Test I > run without this info because I do not want the program stop if an exception > is raised -- FPCUnit will catch -- but I need to know if there are memory > leaks. > > How I disable this message? > > Lazarus 1.5 r47948M FPC 2.6.5 i386-win32-win32/win64 > there is an option in the debugger properties (the property grid in the debugger options)

In Tools>Options>Debugger>General? What option?

Just to be sure: This is about your app (intentionally) not having FPC_RAISEEXCEPTION? There is no other breakpoint (check in breakpoints window of menu "View" "Debugger windows")?

No. Exception could be raised, but FPCUnit will catch. Without debug-info these exception not show a message. But I need to see the Heaptrc info at the end.

I guess this feature needs fine tuning. And maybe a "run without debugger" command.

I always create two Build modes: Debug and Run. To normal app, Debug mode has all options to debug and Run mode has nothing (nor debug-info or heaptrc). The "problem" is only for run Test programs, ie, in Run mode I need check heaptrc.

Regards,
Marcos Douglas

Reply by email

Mattias Gaertner
to Marcos Douglas
Show quoted text 9 lines
[...] > Just to be sure: This is about your app (intentionally) not having > FPC_RAISEEXCEPTION? > There is no other breakpoint (check in breakpoints window of menu "View" > "Debugger windows")? No. Exception could be raised, but FPCUnit will catch. Without debug-info these exception not show a message. But I need to see the Heaptrc info at the end.

Does that mean you don't want to run it in the debugger, you only want to run it and read its stdout?

Show quoted text 7 lines
> I guess this feature needs fine tuning. And maybe a "run without debugger" > command. I always create two Build modes: Debug and Run. To normal app, Debug mode has all options to debug and Run mode has nothing (nor debug-info or heaptrc). The "problem" is only for run Test programs, ie, in Run mode I need check heaptrc.

Mattias

Reply by email

martin
to Marcos Douglas: In Tools>Options>Debugger>General? What option? No. Exception could be raised, but…
Marcos Douglas wrote 5 lines
On Mon, Feb 23, 2015 at 11:44 AM, martin wrote: > > there is an option in the debugger properties (the property grid in the > debugger options) In Tools>Options>Debugger>General? What option?

Sorry my fault, the option wasnt published.

I committed that, with added fine tuning "WarnOnSetBreakPointError"

But ultimately it needs 2 run commands, with/without debugger.

No. Exception could be raised, but FPCUnit will catch. Without debug-info these exception not show a message. But I need to see the Heaptrc info at the end.

heaptrc shows without debugger too.
However it runs with (reduced) debug info.

I wonder... Even without debug info the exe (if not stripped) usually contains enough for exceptions to be intercepted by the debugger. (I do have to double check) But this is based on linker info and depends on fpc ppu.

I always create two Build modes: Debug and Run. To normal app, Debug mode has all options to debug and Run mode has nothing (nor debug-info or heaptrc).

The problem is that running an app without debuginfo in the IDE, still runs it in the debugger (unless you globally change to not use any debugger / dropdown in options)

Yet the new behaviour is to caught exactly that: running without debug info but with debugger.

So in this case, it must always run without debugger, but toolbuttons and menu must visually indicate this, to make the user aware of it.

The "problem" is only for run Test programs, ie, in Run mode I need check heaptrc.

IIRC you can add the exception classes to the ignore list. Even this is displayed in the global options, it is afaik stored per project.

Reply by email

Marcos Douglas
to Mattias Gaertner: On Mon, 23 Feb 2015 12:02:08 -0300 Does that mean you don't want to run it in the…
Mattias Gaertner wrote 15 lines
On Mon, 23 Feb 2015 12:02:08 -0300 Marcos Douglas wrote: >[...] > > Just to be sure: This is about your app (intentionally) not having > > FPC_RAISEEXCEPTION? > > There is no other breakpoint (check in breakpoints window of menu "View" > > "Debugger windows")? > > No. Exception could be raised, but FPCUnit will catch. > Without debug-info these exception not show a message. But I need to > see the Heaptrc info at the end. Does that mean you don't want to run it in the debugger, you only want to run it and read its stdout?

I want run using IDE, see the FPCUnit GUI which tests passed or not, so on. When close the program I would like to see the Heaptrc's message box to know if there are memleaks. I always did that.

Show quoted text 9 lines
> > I guess this feature needs fine tuning. And maybe a "run without debugger" > > command. > > I always create two Build modes: Debug and Run. To normal app, Debug > mode has all options to debug and Run mode has nothing (nor debug-info > or heaptrc). The "problem" is only for run Test programs, ie, in Run > mode I need check heaptrc. Mattias

Marcos Douglas

Reply by email

Marcos Douglas
to martin: Sorry my fault, the option wasnt published. I committed that, with added fine tuning…
martin wrote 15 lines
On 23/02/15 15:02, Marcos Douglas wrote: > > On Mon, Feb 23, 2015 at 11:44 AM, martin wrote: >> >> >> there is an option in the debugger properties (the property grid in the >> debugger options) > > In Tools>Options>Debugger>General? What option? Sorry my fault, the option wasnt published. I committed that, with added fine tuning "WarnOnSetBreakPointError" But ultimately it needs 2 run commands, with/without debugger.

I will test but could not be as before or, better, why not show this message only if there are breakpoints marked?

Show quoted text 6 lines
> No. Exception could be raised, but FPCUnit will catch. Without debug-info > these exception not show a message. But I need to see the Heaptrc info at > the end. heaptrc shows without debugger too. However it runs with (reduced) debug info.

Yes, shows without debugger but the message (at the first mail) is always displayed too.
Why not show this message only if there are breakpoints marked?

Show quoted text 14 lines
I wonder... Even without debug info the exe (if not stripped) usually contains enough for exceptions to be intercepted by the debugger. (I do have to double check) But this is based on linker info and depends on fpc ppu. > I always create two Build modes: Debug and Run. To normal app, Debug mode > has all options to debug and Run mode has nothing (nor debug-info or > heaptrc). The problem is that running an app without debuginfo in the IDE, still runs it in the debugger (unless you globally change to not use any debugger / dropdown in options) Yet the new behaviour is to caught exactly that: running without debug info but with debugger.

OK

So in this case, it must always run without debugger, but toolbuttons and menu must visually indicate this, to make the user aware of it.

Good.

Show quoted text 6 lines
> The "problem" is only for run Test programs, ie, in Run mode I need check > heaptrc. IIRC you can add the exception classes to the ignore list. Even this is displayed in the global options, it is afaik stored per project.

Not a good option for me. I have many exception classes. I need to execute many times to know what add...

Thanks,
Marcos Douglas

Reply by email

Mattias Gaertner
to Marcos Douglas: In Tools>Options>Debugger>General? What option? No. Exception could be raised, but…
[...] No. Exception could be raised, but FPCUnit will catch. Without debug-info these exception not show a message. But I need to see the Heaptrc info at the end.

If you only want to run the programs and read stdout you should use the new external tools. The IDE can even run the tests in parallel. The new tools need an example as demo. Maybe this is a good opportunity for me to write one.

Can you give me some hints about the heaptrc parser?

Mattias

Reply by email

Marcos Douglas
to Mattias Gaertner: On Mon, 23 Feb 2015 12:02:08 -0300 If you only want to run the programs and read stdout…
Mattias Gaertner wrote 14 lines
On Mon, 23 Feb 2015 12:02:08 -0300 Marcos Douglas wrote: >[...] > No. Exception could be raised, but FPCUnit will catch. > Without debug-info these exception not show a message. But I need to > see the Heaptrc info at the end. If you only want to run the programs and read stdout you should use the new external tools. The IDE can even run the tests in parallel. The new tools need an example as demo. Maybe this is a good opportunity for me to write one. Can you give me some hints about the heaptrc parser?

I think we are talking about different things.

See the attachments:
#1 I have a FPCUnit program and run in the IDE without debug-info, but marked Heaptrc option. So the IDE shows the message. #2 I run the tests. If an exception raises, the framework catch (red lights) but without message box inside IDE (do not have debug-info). #3 When close the program, I would like to see this image.

Best regards,

Marcos Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-debuginfo.png
Type: image/png
Size: 4414 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150223/271383aa/attachment-0003.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-runtests.png
Type: image/png
Size: 23177 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150223/271383aa/attachment-0004.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: 3-memleak.png
Type: image/png
Size: 5115 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150223/271383aa/attachment-0005.png>

Reply by email

Marcos Douglas
to Mattias Gaertner: On Mon, 23 Feb 2015 13:26:17 -0300 Stopping on exceptions require an breakpoint. Mattias
Mattias Gaertner wrote 11 lines
On Mon, 23 Feb 2015 13:26:17 -0300 Marcos Douglas wrote: >[...] > I will test but could not be as before or, better, why not show this > message only if there are breakpoints marked? Stopping on exceptions require an breakpoint. >[...]

I don't want to use breakpoint... this is the (inconvenient) problem. I do not use breakpoint or debug-info, but the IDE shows the message talking about that.
I just want the option -gh to display the info about memleak.

Marcos Douglas

Reply by email

martin
to Marcos Douglas: I will test but could not be as before or, better, why not show this message only if…
Marcos Douglas wrote 10 lines
On Mon, Feb 23, 2015 at 12:53 PM, martin wrote: > On 23/02/15 15:02, Marcos Douglas wrote: > > Sorry my fault, the option wasnt published. > > I committed that, with added fine tuning "WarnOnSetBreakPointError" > > But ultimately it needs 2 run commands, with/without debugger. I will test but could not be as before or, better, why not show this message only if there are breakpoints marked?

Because normally the debugger can always set the internal breakpoints to get exceptions. And running in the debugger may be done just to catch an exception.

The idea was to warn the user, if he uses the debugger, but it will not work.

The oversight is that there are good reasons to do this.

Yes, shows without debugger but the message (at the first mail) is always displayed too. Why not show this message only if there are breakpoints marked?

Without debugger differs to without debug info

on tools options debugger is a dropdown. set that to none instead of gdb. then it is without debugger.

Reply by email

martin
to Marcos Douglas: On Mon, Feb 23, 2015 at 1:42 PM, Mattias Gaertner I don't want to use breakpoint... this…

On 23/02/15 16:58, Marcos Douglas wrote

I don't want to use breakpoint...

but in tools > option > debugger > "gdb" is selected. So the IDE assumes you want to debug.

Yet I agree this option is global, not suitable for being changed all the time

Show quoted text 5 lines
this is the (inconvenient) problem. I do not use breakpoint or debug-info, but the IDE shows the message talking about that. I just want the option -gh to display the info about memleak.

Reply by email

Marcos Douglas
to martin: Because normally the debugger can always set the internal breakpoints to get exceptions.…
martin wrote 19 lines
On 23/02/15 16:26, Marcos Douglas wrote: > > On Mon, Feb 23, 2015 at 12:53 PM, martin wrote: >> >> On 23/02/15 15:02, Marcos Douglas wrote: >> >> Sorry my fault, the option wasnt published. >> >> I committed that, with added fine tuning "WarnOnSetBreakPointError" >> >> But ultimately it needs 2 run commands, with/without debugger. > > I will test but could not be as before or, better, why not show this > message only if there are breakpoints marked? Because normally the debugger can always set the internal breakpoints to get exceptions. And running in the debugger may be done just to catch an exception.

Hmm, I didn't know that.

The idea was to warn the user, if he uses the debugger, but it will not work.

I understand.

Show quoted text 11 lines
The oversight is that there are good reasons to do this. > Yes, shows without debugger but the message (at the first mail) is always > displayed too. Why not show this message only if there are breakpoints > marked? Without debugger differs to without debug info on tools options debugger is a dropdown. set that to none instead of gdb. then it is without debugger.

I need for project, not globally. If this option exists in Build modes...

Marcos Douglas

Reply by email

Marcos Douglas
to martin: On 23/02/15 16:58, Marcos Douglas wrote but in tools > option > debugger > "gdb" is…
martin wrote 9 lines
On 23/02/15 16:58, Marcos Douglas wrote > > I don't want to use breakpoint... but in tools > option > debugger > "gdb" is selected. So the IDE assumes you want to debug. Yet I agree this option is global, not suitable for being changed all the time

Yes, thank you.

But do you agree even selected a debugger, the IDE makes an executable without debug-info (deploy)? In other words, we do not need change the option tools > option > debugger > "gdb" always we want to compile without debug-info, right?

Marcos Douglas

Reply by email

martin
to Marcos Douglas
Marcos Douglas wrote 15 lines
On Mon, Feb 23, 2015 at 2:14 PM, martin wrote: > On 23/02/15 16:58, Marcos Douglas wrote >> I don't want to use breakpoint... > but in tools > option > debugger > "gdb" is selected. So the IDE assumes you > want to debug. > > Yet I agree this option is global, not suitable for being changed all the > time Yes, thank you. But do you agree even selected a debugger, the IDE makes an executable without debug-info (deploy)? In other words, we do not need change the option tools > option > debugger > "gdb" always we want to compile without debug-info, right?

there are cases

- debug info in package, but not project
- project is launcher for self written dll

Reply by email

Marcos Douglas
to martin
martin wrote 9 lines
On 23/02/15 17:16, Marcos Douglas wrote: > > > I need for project, not globally. If this option exists in Build modes... > for now you should be able to disable it. ( that option will stay) then we need to find ways to deal with all the requirements I am currently on my laptop. so I will not do anything now.

No problem buddy, is just a message box! ;-)
I was thinking this was a bug, but not... well, I only need to click in OK when run and the message show up. Don't worry about that.

Anyway, thanks for your time and fast answer.

Best regards,
Marcos Douglas

Reply by email

Mattias Gaertner
to Marcos Douglas: On Mon, Feb 23, 2015 at 1:29 PM, Mattias Gaertner I think we are talking about different…
Show quoted text 18 lines
On Mon, Feb 23, 2015 at 1:29 PM, Mattias Gaertner wrote: > On Mon, 23 Feb 2015 12:02:08 -0300 > Marcos Douglas wrote: > >>[...] >> No. Exception could be raised, but FPCUnit will catch. >> Without debug-info these exception not show a message. But I need to >> see the Heaptrc info at the end. > > If you only want to run the programs and read stdout you should use the > new external tools. The IDE can even run the tests in parallel. > The new tools need an example as demo. Maybe this is a good > opportunity for me to write one. > > Can you give me some hints about the heaptrc parser? I think we are talking about different things.

You are right.
You want to run the program without debugger, but the output should scan for the heaptrc output and give a box.
Right?

Show quoted text 6 lines
See the attachments: #1 I have a FPCUnit program and run in the IDE without debug-info, but marked Heaptrc option. So the IDE shows the message. #2 I run the tests. If an exception raises, the framework catch (red lights) but without message box inside IDE (do not have debug-info). #3 When close the program, I would like to see this image.

Mattias

Reply by email

Marcos Douglas
to Mattias Gaertner
Mattias Gaertner wrote 26 lines
On Mon, 23 Feb 2015 13:46:42 -0300 Marcos Douglas wrote: > On Mon, Feb 23, 2015 at 1:29 PM, Mattias Gaertner > wrote: > > On Mon, 23 Feb 2015 12:02:08 -0300 > > Marcos Douglas wrote: > > > >>[...] > >> No. Exception could be raised, but FPCUnit will catch. > >> Without debug-info these exception not show a message. But I need to > >> see the Heaptrc info at the end. > > > > If you only want to run the programs and read stdout you should use the > > new external tools. The IDE can even run the tests in parallel. > > The new tools need an example as demo. Maybe this is a good > > opportunity for me to write one. > > > > Can you give me some hints about the heaptrc parser? > > I think we are talking about different things. You are right. You want to run the program without debugger, but the output should scan for the heaptrc output and give a box. Right?

Yes, that is it.
The IDE continues doing that. But now the IDE always shows the message about debug and breakpoint, even I don't need it.

Show quoted text 9 lines
> See the attachments: > #1 I have a FPCUnit program and run in the IDE without debug-info, but > marked Heaptrc option. So the IDE shows the message. > #2 I run the tests. If an exception raises, the framework catch (red > lights) but without message box inside IDE (do not have debug-info). > #3 When close the program, I would like to see this image. Mattias

Thanks,
Marcos Douglas

Reply by email