6

After downloading bitcoin source from github I'l try to open it in Netbeans for Mac. Please tell how to open all bitcoin project for run it with breakpoints in IDE?

7

I can recommend the Qt Creator IDE or Xcode on OSX. The later has (since Xcode 8) problems auto-completing C++.

If you use Qt Creators IDE, you can also debug the Qt objects natively.

In Qt Creator, do the following:

  1. Install all dependencies
  2. git checkout https://github.com/bitcoin/bitcoin
  3. ./autogen.sh
  4. ./configure --enable-debug (maybe more)

  5. Then, create new project in Qt-Creator "import project from existing source".

  6. Go to project settings / run, select src/qt/bitcoin-qt (or src/bitcoin) as executable

  7. Happy debugging / coding.

  • It's working but the breakpoints did not stop process. I want to see some variables and set breakpoint in line I need to view, but when I call in bitcoin-qt console command I need, the breakpoint did not work. Please help to set it correctly. – Denis Leonov Dec 12 '16 at 9:43
  • I make "Run". And think that it is not correct. So when I make "Debug run", the IDE ask me to specify "Debugger command" and I don't know where to find it. So I think here is my fault. Please help me. – Denis Leonov Dec 12 '16 at 9:46
  • Did you select the "Executable" in the "Project settings"? – Jonas Schnelli Dec 12 '16 at 12:47
  • Yes. I select the "Executable". But my IDE is Netbeans, not QT. So maby your example is not fully suitable for this. – Denis Leonov Dec 12 '16 at 13:05
0

As Jonas said above, however ensure that daemon is NOT set to 1 in bitcoin.conf (or that it's passed as an argument on startup). If it is set, breakpoints will not be triggered (and in some cases can cause the whole program to crash).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.