Remote debug environment construction of ETH full node

Source: Internet
Author: User

ETH full node is still a waste of resources, especially in the synchronization of all the blockchain, if you are going to do a local full-node debug, a bit unrealistic. This document

  1. Compile, install Devel on the machine to run, the general method is, after compiling, put on the server, install Delve Debug tool: Https://github.com/derekparker/delve

  2. After installation, go to the project root/ cmd/geth directory.

  3. Run the go build -gcflag='-N -l' command, Golang 1.10 run the go build -gcflag='all -N -l command, after this step, you should find an executable file named after the directory geth .

  4. Then run the command (the last argument to dlv --listen=:6070 --headless=true --api-version=2 exec geth -- -- distinguish the geth parameter, without this delimiter, it will be considered later arguments or DLV parameters) ..... This command is to open a debug server and listen to the 6070 port on this machine.

  5. Go to Goland, here we use Goland for code trace debugging, add go remote option, add correct parameters, start debug, if console appears image.png

  6. that is, the connection is successful, enjoy you debugging !

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.