Ruby : add content for debugging ruby using vscode rdbg extension
Checks
- [x] This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- [x] I have thoroughly read and understand The Odin Project Contributing Guide
- [x] Would you like to work on this issue?
Describe your suggestion
This issue is for proposing content on using vscode to debug your ruby code.
this is a follow up to https://github.com/TheOdinProject/curriculum/issues/29800#issuecomment-3341894556
the lesson currently includes debugging using puts and pry-byebug
it also does mention the vscode extension rdbg in assignment and refers the docs too.
-
many projects in ruby course are terminal games which take user input for example. so thinking of including how to configure debugger to work with programs using user input. basically adding "useTerminal: true" and using the vscode terminal tab instead of vscode debug console tab which is default.
-
explain why debugging a file with just
def hello
puts "hello world"
end
does not make sense cause it's not calling the function hello only defining it.
-
you have to keep your cursor focused inside the file you wanna debug using vscode rdbg extension because that focused file will be used as the filepath by default.
-
using breakpoints(the red dots) on line numbers instead of
binding.pryordebuggerfor breakpoints
i think we already have resource on what diff types of actions/button you see like continue, step in , step out, etc. do
- i find the "watch" section inside vscode debugger as powerful in the sense that it can calculate expressions too aside from just checking variable current value, it should be a help to include a sentence about this feature imo it helps more when your proj is big and so many local variables to look at, or checking a certain condition's value while running code. this should be highlited?
Path
Ruby / Rails
Lesson Url
https://www.theodinproject.com/lessons/ruby-debugging
(Optional) Discord Name
X AJ X
(Optional) Additional Comments
No response
@TheOdinProject/ruby
@XAJX179 Thank you for making this issue. These are great ideas I think, and I'll assign you. Let me know if you have any questions or want any guidance on anything.
@XAJX179 Thank you for making this issue. These are great ideas I think, and I'll assign you. Let me know if you have any questions or want any guidance on anything.
curriculum already have a dedicated folder to contain images for ruby debugging lesson
i would like to add screenshots to it, which i could link inside the lesson.
i see the current images are linked like https://cdn.statically.io/gh/TheOdinProject/curriculum/... how can i create such links to images i will add which start with cdn.statically.io/ ?
i guess we use https://statically.io/convert/ after PR is merged ?
@XAJX179 image instructions are in this repo's contributing guide
This issue is stale because it has had no activity for the last 30 days.
Bump.
status: The PR #30267 is ready and a review is requested, once the other PR for images gets merged i will update the links in lesson to these images.
This issue is stale because it has had no activity for the last 30 days.
Bump.
status: The images PR is ready for review. The content PR is almost ready for review (almost ready since images are still not there). The PR for adding lesson in site db/fixture is ready for review.
Once the images PR get merged i will update the dummy links in the content PR.
https://github.com/TheOdinProject/curriculum/pull/30267 https://github.com/TheOdinProject/curriculum/pull/30268 https://github.com/TheOdinProject/theodinproject/pull/5172