Debugging R (mingw64/msys2) on windows

Sysprogs forums Forums VisualGDB Debugging R (mingw64/msys2) on windows

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28301
    suemac
    Participant

    I am trying to debug an R package compiled using custom toolchain (https://cran.r-project.org/bin/windows/Rtools/) msys2-mingw64-gcc-8.3.0.  R is an interpreted language for scientific computing and data-science.  The package is compiled using  R tools.  I have complied both R and my package using the toolchain.  The only way I can think of using visualgdb is to start the R terminal program within the VisualGDB – Quick Debug Setup dialog.  I was able to properly specify toolchain settings. I added extra paths to msys2 and mingw64 bin directories as well as paths to directories with source of R and my package.  I used the path mappings dialog to include and source directories.  I opened a source file and placed a breakpoint and started debugging.  However, the breakpoint was never reached.  The program terminates normally.

    I couldn’t find documentation of how I could add source files and stop the program at breakpoints.

    Thanks,

    SM

    Attachments:
    You must be logged in to view attached files.
    #28303
    support
    Keymaster

    Hi,

    Most likely, the program you are trying to debug is built without debugging symbols, hence gdb cannot set any breakpoints.

    Although we don’t have a MinGW-specific tutorial for this, we do have a very detailed one showing how this works on Linux: https://visualgdb.com/tutorials/linux/symbols/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.