Skip to content
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

Debugging Tools/Strategies #107

Closed
hackling opened this issue Jul 31, 2015 · 34 comments
Closed

Debugging Tools/Strategies #107

hackling opened this issue Jul 31, 2015 · 34 comments
Labels

Comments

@hackling
Copy link

No one writes foolproof code. Eventually you're going to have to debug.

I thought it might be a good exercise to show case off some strategies and tools, especially for the beginners out there.

No one should have to do ALL their rails debugging in the view (like I did 😒 when I first started).

@ridget
Copy link
Member

ridget commented Jul 31, 2015

@hackling you're trying to tell me raise, puts and p arent valid debugging strategies? :trollface: Would love to see this 👍

@hackling
Copy link
Author

I think this would be good if other people could bring their own tips to the party.

I was going to explain:

  • using raise to get information at a certain point
  • IRB
  • Rails Console
  • binding.pry (Gem)

@hackling
Copy link
Author

@hackling you're trying to tell me raise, puts and p arent valid debugging strategies?

@ridget Actually, I'm going to tell you that they are. But beginners, especially those straight from Rails Girls, would have no idea about any of them.

@ridget
Copy link
Member

ridget commented Jul 31, 2015

@hackling m8 now i just feel bad. not sure if youre including it, or someone else will bring to the party but remote-pry is also a++

@hackling
Copy link
Author

@ridget You should demo remote-pry :D

Personally, rather than me waffling on for 30 minutes, I'd love to see this as more of a collective of lightning talks that all share a similar topic/ theme.

Everyone debugs differently, and I'm sure many people will probably think how I do it could be improved.

@patrickgordon
Copy link

Awesome - think if this is aimed at beginner this would be great.

👍

@SorchaAbel
Copy link

yep definitely, great topic :)

On 31 July 2015 at 11:01, Patrick notifications@github.com wrote:

Awesome - think if this is aimed at beginner this would be great.

[image: 👍]


Reply to this email directly or view it on GitHub
#107 (comment).

Sorcha Abel
IT Software Developer

T 07 3319 4430
E sorcha.abel@htw.com.au

Level 1, 811 Gympie Road, Chermside, QLD, 4032
PO Box 61, Chermside South, QLD, 4032

HERRON TODD WHITE | www.htw.com.au

Please consider the impact on the environment before you print this email

The information contained in this e-mail and any attachments are strictly
private and confidential. This e-mail should only be read by the intended
addressee. If you are not the intended addressee, you are strictly
prohibited from using, reproducing, disclosing, or distributing the
information contained herein and any attached files and/or documents.
Unless stated otherwise, this email represents only the views of the sender
and not the views of Herron Todd White. Before opening or using any files
and/or attachments, we recommend you run your own virus protection, as
although we will not knowingly transmit a virus, Herron Todd White accepts
no liability for virus transmission. Liability limited by a scheme approved
under Professional Standards Legislation. The scheme does not apply within
Tasmania.

@ghiculescu
Copy link
Contributor

Throw https://github.com/deivid-rodriguez/byebug into the mix too

@michael-harrison
Copy link
Member

First apologies to the bash purists but it might be worth showing how it's done in RubyMine with the ruby-debug-ide gem. Would be happy to help out.

@hackling
Copy link
Author

Just to clarify, for those people saying "showcase X, cover Y, etc". If you know about it, and I'm not covering it in the few things I've mentioned above, I'm inviting you to do a bit about in the same talk.

@hackling
Copy link
Author

First apologies to the bash purists but it might be worth showing how it's done in RubyMine with the ruby-debug-ide gem. Would be happy to help out.

If someone knew how to do something similar to this, but in Sublime, that would be great too, as I suspect this is the tool that most newbies use.

@michael-harrison
Copy link
Member

There is a debugger for Sublime: https://packagecontrol.io/packages/Ruby%20Debugger. Will have a look at it over the next couple of weeks. It's been a long time since I used Sublime but I believe I can get it working.

@michael-harrison
Copy link
Member

@hackling if you like you I'll do the IDE / Editor part of the talk

@nigelr
Copy link
Member

nigelr commented Aug 1, 2015

@hackling I will put this on the list for the next BrisRuby (25th)... Can you please head it up and pick your area experts (eg. IDE, Pry etc).. I could be definitely done like a Panel of experts...

@michael-harrison
Copy link
Member

Hi all, I'm happy to do the RubyMine section. I can possibly do Sublime but I'm by no means a regular user (anybody out there?).

In general I think it would be good to have a common set of code that we're debugging and common set of aspects in debugging that we'll be covering. This will allow the audience to get a feel for how each approach works without having to understand a new set of code and aspects for each debugging tool. Let me know what you think.

@patrickgordon
Copy link

That's a really good idea!
Looking forward to the RubyMine demo
On 2 Aug 2015 10:48 am, "Michael Harrison" notifications@github.com wrote:

Hi all, I'm happy to do the RubyMine section. I can possibly do Sublime
but I'm by no means a regular user (anybody out there?).

In general I think it would be good to have a common set of code that
we're debugging and common set of aspects in debugging that we'll be
covering. This will allow the audience to get a feel for how each approach
works without having to understand a new set of code and aspects for each
debugging tool. Let me know what you think.


Reply to this email directly or view it on GitHub
#107 (comment).

@davekinkead
Copy link
Member

+1

@hackling
Copy link
Author

hackling commented Aug 3, 2015

@nigelr Sadly I won't be in town August 25th as I'm expecting to be in Melbourne for about a month. I'm happy for someone else to take this topic and run with it in my absence.

@hackling
Copy link
Author

I'm in town this month! Shall we revisit this talk?

@nigelr
Copy link
Member

nigelr commented Oct 19, 2015

That would be great!

@patrickgordon
Copy link

Keen! 👍

@michael-harrison
Copy link
Member

Sorry guys I'll be in Perth :(

@hackling
Copy link
Author

@ridget Can you still demo remote-pry?
Does anyone want to cover Sublime, or Ruby-Mine (seeing as @michael-harrison will be away)

@ridget
Copy link
Member

ridget commented Oct 19, 2015

@hackling would love to, but unlikely I'm going to be leaving the house any time soon, I'm going to dob in @geoffreyd for remote-pry though, as he's pretty switched on with it.

@hackling
Copy link
Author

I've suggested to @nigelr that we put this off until we have a few more participants ready to do this. Hopefully @michael-harrison and @ridget are back in town/ up to the task next month.

@nigelr
Copy link
Member

nigelr commented Oct 28, 2015

Thinking of headlining with this next month, can all those involved confirm if they can make it
@hackling, @michael-harrison, @ridget, @ghiculescu and anyone else who wants to join this panel..

@ridget
Copy link
Member

ridget commented Oct 28, 2015

@nigelr yep, count me in

@ridget
Copy link
Member

ridget commented Nov 17, 2015

@michael-harrison will you still be in perth for meetup next week? @hackling is trying to tie this together and we cant reach you on slack

@hackling
Copy link
Author

To be honest, if michael can't make it, it's all good. I think I under-estimated how much content I have.

@patrickgordon
Copy link

Woo! Looking forward to this guys 👍

@michael-harrison
Copy link
Member

Hey guys. I can most likely do next week. Just working out kiddy care now.

@michael-harrison
Copy link
Member

Did we end up getting a common code base for comparisons between the different options?

@michael-harrison
Copy link
Member

@hackling & @ridget Ok, I'm in. Since this is a shared presentation here's what I'm thinking about covering:

  • why / when should we use a debugger
  • starting ruby script debugging
  • starting rails script debugging
  • basic break points
  • conditional break points
  • inspection of variables & utilisation of logs
  • combination of rspec and debugger
  • limitations for debugging

I thought about doing remote debugging (i.e. debugging an application on a remote server) but this is fairly advanced and you could do a whole talk just on that.

Let me know what you think :)

@hackling
Copy link
Author

@michael-harrison We invited you to a conversation on the Brisbane slack where we've been discussing it all.

@nigelr nigelr closed this as completed Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants