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.
I know that it was a while, but I added two new PRs with some added debugging support features to make it even more convenient.
So, PRs in quesion are: