-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Description
Checks
- This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- I have thoroughly read and understand The Odin Project Contributing Guide
- 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 #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"
enddoes 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