Those locations are not really weird. They are internals of methods that are inlined due to the inlining nature of the methods with blocks (they become part of the calling method).
I have to figure out if I can play with debug scopes to make them behave skippable on next command.
For LLVM in console it shows contents of Strings and Arrays.
For hashes/set I have to add some additional synthetic providers.
For GDB I have to implement the same set.
The problem with Array#to_s:String or similar methods that they are not injecting into executable if they are not used somewhere in the code. As soon as you called it somewhere in your code you can call it from debugger then.
If method is defined (was called somewhere in the code flow) in the executable you should be able to call it in debugger (given that it has no side-effects on the other data or internal state).
Maybe you can make a shard that has a method that calls all the to_s methods on common classes, so that the #to_s methods don’t all get “lost” so they are available for debug session…?
A short tutorial somewhere on how to “use a debugger” (especially in crystal land) would be nice, here’s how to view a local variable, here’s how to list all of them, here’s how to call a method, here’s how to inspect a variable…
Since it’s merged might even be useful in the crystal gitbook :)
Yes, I am planning to make that tutorial. I am just somehow stretched with different business projects at the same time so I am trying to find some time to make it.
Thank you for being so patient and working on debugging support fo Crystal. Great work!
I can’t stress enough now valuable the debugger support will be for many of us using Crystal as well as newcomers wanting to learn Crystal.
I think it would help a lot when Crystal 1.0 is available and someone would evaluate Crystal and it’s ecosystem to see if it’s safe for them to use. Good tooling support is a big plus.
I have tried and tried to get this working on windows following Debug Crystal in VSCode via CodeLLDB - DEV Community but it doesn’t stop on any breakpoints and i cant seem to get them from the debug console either or from lldb in command line.