Skip to content

Ruby : add content for debugging ruby using vscode rdbg extension #30210

@XAJX179

Description

@XAJX179

Checks

Describe your suggestion

This issue is for proposing content on using vscode to debug your ruby code.

this is a follow up to #29800 (comment)

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions