Bitcoin core development in IDE #13694

issue LucaPaterlini opened this issue on July 17, 2018
  1. LucaPaterlini commented at 8:36 PM on July 17, 2018: none

    Hello, where I could find the guide on how to install an IDE and debug the code?

  2. MarcoFalke commented at 9:12 PM on July 17, 2018: member

    Sorry, we don't have documentation on how to use common IDEs with our build configuration, because for integration the IDEs often require cmake. However, it is possible to use any IDE (like clion or vim) to edit the code.

    Some further resources, that talk about specific IDEs:

  3. MarcoFalke added the label Questions and Help on Jul 17, 2018
  4. MarcoFalke added the label Build system on Jul 17, 2018
  5. LucaPaterlini commented at 10:58 PM on July 17, 2018: none

    so far I am not happy with this answer, because this means that clion is not available for debug mode and step by step inspection, the only viable option from what you have suggested looks like the visual studio option. Does this mean that the codebase has never been tested step by step with a debugger?

  6. sipa commented at 11:09 PM on July 17, 2018: member

    @LucaPaterlini Most developers don't use IDEs as far as I know, but that doesn't prevent editing and debugging.

  7. LucaPaterlini commented at 11:12 PM on July 17, 2018: none

    why there is not a paragraph or a tutorial on how to debug and make the life easy for the new contrbutors?

  8. MarcoFalke commented at 11:39 PM on July 17, 2018: member

    clion is not available for debug mode and step by step inspection

    I do believe this is possible. I did this a few years ago, so no guarantee on correctness or completeness:

    • Build the executable "normally" in the terminal (./autogen.sh && ./configure && make -j 2)
    • Open the source tree in clion and add a "run configuration" to clion, selecting the executable manually and specifying the command line args. Something like this:

    screenshot from 2018-07-17 19-29-46

    • Set a debug point in one of the source files and debug the configuration target you just created...

    See for example:

    screenshot from 2018-07-17 19-35-34

  9. laanwj renamed this:
    Bitcoin core development
    Bitcoin core development in IDE
    on Jul 18, 2018
  10. crowdcoinChain commented at 9:24 AM on July 18, 2018: none

    hi, I have a newer version 2018.1, could you explain what datadir param stand for?

    I have tried the way you suggested and I got

    Error running 'bitcoind' Cannot run 'bitcoind' on '<default>'

  11. jonasschnelli commented at 8:05 AM on July 19, 2018: contributor

    If one wants line by line debugging, gdb or lldb is probably the most simplest way to do this. Just use ./configure --enable-debug and run gdb src/bitcoind.

    Using Qt Creator's IDE is also an effective how to do line-by-line debugging (more GUIish then gdb) including interactive variable inspection, etc.

  12. MarcoFalke commented at 11:17 AM on July 19, 2018: member

    If someone wants to add documentation on how to setup an IDE with Bitcoin Core please do so at https://github.com/bitcoin-core/docs

  13. MarcoFalke closed this on Jul 19, 2018

  14. sipsorcery commented at 12:13 PM on July 25, 2018: member

    If someone wants to add documentation on how to setup an IDE with Bitcoin Core please do so

    For Windows devs:

    Install Visual Studio Community Edition (free), Double click build_msvc/bitcoin.sln from #11526 ;).

  15. toknT commented at 5:56 AM on November 26, 2019: none

    I am using wsl and vscode to debug set .launch.json like this

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name": "(gdb) Launch",
                "type": "cppdbg",
                "request": "launch",
                "program": "${workspaceFolder}/src/bitcoind",
                "args": [],
                "stopAtEntry": false,
                "cwd": "${workspaceFolder}",
                "environment": [],
                "externalConsole": false,
                "MIMode": "gdb",
                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    }
                ]
            }
        ]
    }
    
  16. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 09:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me