From rdonnelly at continuum.io  Fri Feb 24 02:37:07 2017
From: rdonnelly at continuum.io (Ray Donnelly)
Date: Fri, 24 Feb 2017 01:37:07 +0000
Subject: [Rd] Debugging tools and practices in Windows?
In-Reply-To: <7004d113-5304-89c0-07ef-34c6e517b768@gmail.com>
References: <CAOrRV3fPtaGMfnbMMMJsgyq6SnhnNNSTpJhY-Gc1DDFtyQDDhw@mail.gmail.com>
	<a2f670c3-5c27-c8d1-f30f-0a0cf3925f69@gmail.com>
	<CAOrRV3d8GtBhZR1ZP9M=Y-btWEcR1cBJwMk3p9Kse6rDQ2gsAg@mail.gmail.com>
	<7004d113-5304-89c0-07ef-34c6e517b768@gmail.com>
Message-ID: <CAF5kcVW3NEYydeqT1XKfsDdortHwo2YiKxWO4EBa8ej6OxHgRQ@mail.gmail.com>

On Thu, Feb 23, 2017 at 7:49 PM, Tomas Kalibera <tomas.kalibera at gmail.com>
wrote:

> The R for Windows FAQ suggests "make DEBUG=T" and has some more hints
> https://cran.r-project.org/bin/windows/base/rw-FAQ.html
>
> Tomas
>
>
>
> On 02/23/2017 08:10 PM, Javier Luraschi wrote:
>
>> Right, I'm talking about C code.
>>
>> Do you remember if you had to set specific CFLAGS or other settings to get
>> gdb working? I wasn't able to get gdb() working with the standard build
>> settings.
>>
>> Otherwise, Rprintf() would work for sure.
>>
>> Thank you!
>>
>>
>>
>> On Thu, Feb 23, 2017 at 10:55 AM, Duncan Murdoch <
>> murdoch.duncan at gmail.com>
>> wrote:
>>
>> On 23/02/2017 1:36 PM, Javier Luraschi wrote:
>>>
>>> Hello r-devel, could someone share the tools and practices they use to
>>>> debug the core R sources in Windows?
>>>>
>>>> For instance, I would like to set a breakpoint in `gl_loadhistory` and
>>>> troubleshoot from there.
>>>>
>>>> You're talking about debugging the C code rather than the R code, I
>>> think.
>>>
>>> These days I mostly avoid debugging in Windows, but when I have to do it,
>>> I use gdb.  There used to be a front end for it (Insight) that worked in
>>> Windows, but I don't think it works with our current gdb build.  Google
>>
>> names lots of other front ends, but I haven't tried any of them in
>>> Windows.
>>>
>>>
I feel Qt Creator provides a good enough UI for debugging things on Windows
(it allows you to debug externally-built executables).


> The other choice is the old fashioned method:  add lots of Rprintf()
>>> statements to the source and recompile.
>>>
>>> Duncan Murdoch
>>>
>>>
>>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] Debugging tools and practices in Windows?
Ray Donnelly