curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

Ruby : add content for debugging ruby using vscode rdbg extension

Open XAJX179 opened this issue 2 months ago • 6 comments

Checks

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.pry or debugger for 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

XAJX179 avatar Oct 04 '25 19:10 XAJX179

@TheOdinProject/ruby

01zulfi avatar Oct 11 '25 10:10 01zulfi

@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.

JoshDevHub avatar Oct 14 '25 17:10 JoshDevHub

@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 avatar Oct 15 '25 13:10 XAJX179

@XAJX179 image instructions are in this repo's contributing guide

mao-sz avatar Oct 15 '25 15:10 mao-sz

This issue is stale because it has had no activity for the last 30 days.

github-actions[bot] avatar Nov 20 '25 02:11 github-actions[bot]

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.

XAJX179 avatar Nov 20 '25 06:11 XAJX179

This issue is stale because it has had no activity for the last 30 days.

github-actions[bot] avatar Dec 21 '25 02:12 github-actions[bot]

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

XAJX179 avatar Dec 21 '25 05:12 XAJX179