Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

docker: enable debugging with byebug and friends #533

Merged
merged 2 commits into from
Sep 21, 2018

Conversation

mcritchlow
Copy link
Member

@mcritchlow mcritchlow commented Sep 19, 2018

Fixes #issuenumber

Local Checklist

  • QA-ed locally?
  • Configuration updated (if needed)?
  • Documentation updated (if needed)?

What does this PR do?

Adds support and documentation for use debuggers like byebug with the docker/compose development environment

Why are we doing this? Any context of related work?

This is still new territory for us, and I ran across this issue working on a different project last week. So I thought I would document and add the solution that I found here.

Where should a reviewer start?

See docker/README.md for how this would be used in practice

Manual testing steps?

  • Run a fresh build using the docker/dev/docker-compose.yml file.
  • Add a byebug statement somewhere. Controller, wherever.
  • Run the app and get it to trigger the breakpoint
  • Follow the instructions for using docker attach <container> and try interacting with byebug

@ucsdlib/developers and @orangewolf - please review

@VivianChu
Copy link
Member

👍

1 similar comment
@hweng
Copy link
Contributor

hweng commented Sep 19, 2018

👍

Copy link
Member

@lsitu lsitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcritchlow It looks good with docker. Thanks. However, we haven't included gem byebug in damspas develop and test. when interacting with it I see error like Error wrapping anonymous request: undefined local variable or method `byebug' for #<CatalogController:0x00005654b0c1b398>.

@mcritchlow
Copy link
Member Author

@lsitu - that's a good point. this is more on the assumption that one might use byebug, or another debugger that requires a terminal to interact with, like pry. So the error you're seeing makes sense, byebug isn't actually in our Gemfile in the test/dev group. I can add it as part of this PR if folks would like, but I was admittedly writing this as something that could support it. Thoughts?

@lsitu
Copy link
Member

lsitu commented Sep 20, 2018

@mcritchlow I am fine to have byebug gem added to test/dev group to make it works. But I think we can just update the documentation for it.

@mcritchlow
Copy link
Member Author

@lsitu - Ok sounds good. I'll add it to the Gemfile in a separate commit. Thanks for the feedback!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.682% when pulling da0ebcb on feature/support-docker-debugging into 2fe103f on master.

Copy link
Member

@lsitu lsitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lsitu lsitu merged commit 12c0c69 into master Sep 21, 2018
@lsitu lsitu deleted the feature/support-docker-debugging branch September 21, 2018 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants