Re: Breakpoints

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <459CC83A.5090804__8195.74838174066$1167902795$gmane$org@microsoft.com>
Pepe Iborra wrote:
> Thanks Simon, I will be looking into these asap. I'm taking a plane  
> back home tomorrow morning after some weeks abroad, so it might take  me 
> a few days to catch up.
> 
> See some more comments inlined below
> 
> On 20/12/2006, at 10:49, Simon Marlow wrote:
> 
>> Hi Pepe,
>>
>> I played around with breakpoints a little today, they seem to work  
>> pretty well - nice going!  I discovered a few minor issues that you  
>> might be able to clear up:
>>
>>   - I can't seem to set a breakpoint on 'main'.  In fact, in a file  that
>>     contains only 'main', I get:
>> *Main> :break add Main 1
>> *** Exception: Module main:Main was not loaded under debugging  mode. 
>> Enable debugging mode and reload it
>>
>>     even though I have -fdebugging turned on.
>>
> 
> This might be due to breakpoint coalescing. If there are no local  
> bindings at a site, the breakpoint is not inserted at instrumentation  
> time.
> And there is a possible explanation for the error message. It might  be 
> that in a file with no breakpoints at all, ghci erroneously  reports 
> that the file was not loaded under debugging mode, when in  fact it was.
> Should we disable this form of coalescing to minimize end user  
> confusion, or include a bold disclaimer in the manual and/or the  error 
> message?

I don't have a preference for how to do it, but I definitely think the error 
message shouldn't lie about whether the file was loaded with -fdebugging, and it 
should definitely be possible to set a breakpoint on Main.main.  If you don't 
have time to do this right now, could you file a ticket and milestone it for 6.8?

Cheers,
	Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.