-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add remote debugging with delve #10587
Conversation
… and one with delve, change also default folder of the testnet data to the default .testnets instead of localnet.
…2348, and make make possible for delve to fork process by SYS_PTRACE See: https://kupczynski.info/2020/05/17/remote-debug-go-code.html add env variable which allows to run delve instances on per node-basis: 0 disabled, 1 enabled
@AmauryM @marbar3778 is there any feedback on this PR? Anything I should do to move things further? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good to me. Could we add some docs on how to use this?
Where should I add it? There's just one single command:
Its the same thing like:
But the debug adds the delve-flavor docker image instead of the vanilla one. It also adds some ports (for each of the nodes), but by default only runs a single node in debug mode, but can be enabled for all nodes (and each node has a different port incrementing). Also, tests for Rosetta are failing, but I have no idea why? I haven't touched anything from Rosetta. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also fine with this. But I also would like some docs.
generally looks good to me. Could we add some docs on how to use this?
Where should I add it?
Maybe just a contrib/images/simd-dlv/README.md
for now? I'm also interested in what Delve is in general in that README.
localnet-build-env: | ||
$(MAKE) -C contrib/images simd-env | ||
localnet-build-dlv: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love to have Makefile comments for what's the difference between those 2. Or these comments can go near localnet-start
and localnet-debug
Hello @AmauryM and @marbar3778 I have updated the documentation with a readme file in the |
95ea756
to
64ca717
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really nice, thanks!
## Description This is a feat and adds functionality for a developer to remote-debug a testnet node. This is made possible with `delve` remote debugging. I received some help from here: https://kupczynski.info/2020/05/17/remote-debug-go-code.html Also, @creachadair I made a tiny modification in the testnet file generation. I removed the `localnet` folder and simply let the `testnet init-files` to use the default `.testnets`, since this is also being `.gitignore`d in the repo, and we don't usually want these files in the main repo. Let me know if there are any implications to your update that you made a few days ago. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [x] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [x] manually tested (if applicable)
Description
This is a feat and adds functionality for a developer to remote-debug a testnet node. This is made possible with
delve
remote debugging.I received some help from here: https://kupczynski.info/2020/05/17/remote-debug-go-code.html
Also, @creachadair I made a tiny modification in the testnet file generation. I removed the
localnet
folder and simply let thetestnet init-files
to use the default.testnets
, since this is also being.gitignore
d in the repo, and we don't usually want these files in the main repo.Let me know if there are any implications to your update that you made a few days ago.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change