How to use expression evaluation (lldb) during debugging?

Did you setup the formatters for Crystal? That should show the strings.

Check: How to debug my Crystal app? - #3 by bcardiff

There is no support for arbitrary expressions. With the built-in interpreter I believe this will be possible.

1 Like

I tried the interpreter and it worked, but is there any way to provide evaluating expressions while debugging? Another question, how can I debug with vscode (GUI) when running the code in parse mode? I Currently you can only see breakpoints in the console using the debuger statement? Please help me, thanks, I really like crystal! It’s so perfect!

bro,please help me ,thanks!

Hello acodervic,

With pry in the interpreter you can evaluate expressions. Use debugger in your code to set breakpoints and just run the interpreter. See Crystal's interpreter – A very special holiday present - The Crystal Programming Language.

However, I don’t think there are supports for pry in VScode yet. You have to launch the interpreter apart.