debug

I'm seeing Connection shut down by remote side while waiting for reply to initial handshake packet on my MacBook Air M2 when I launch the debugger in VSCodium (I tried VSCode too). Is the debugger supposed to be working?
6 Replies
ModularBot
ModularBot4mo ago
Congrats @richard.kiss, you just advanced to level 1!
MM
MM4mo ago
I get the same message too, maybe we should file a bug?
MM
MM4mo ago
GitHub
[BUG]: Debug Mojo File fails in VS Code with `Connection shut down ...
Bug description VS Code can no longer debug Mojo with the max 24.5 SDK installed with Magic CLI. Trying to run Debug Mojo File ends with the error message Connection shut down by remote side while ...
richard.kiss
richard.kissOP4mo ago
FYI, the nightly mojo extension for VSCode(/Codium) gets a little further. But I get some weird linker errors about missing symbols.
JIT session error: Symbols not found: [ _stdlib::builtin::str::str[::Stringable]($0),T=move::Move.__str__, _pile::Pile::playable(pile::Pile), _board::SeahavenBoard::playable_for_column(board::SeahavenBoard,::Int) ]
JIT session error: Symbols not found: [ _stdlib::builtin::str::str[::Stringable]($0),T=move::Move.__str__, _pile::Pile::playable(pile::Pile), _board::SeahavenBoard::playable_for_column(board::SeahavenBoard,::Int) ]
seems like maybe template expansion is not working properly? Or maybe this is happening only in the debugger because it's trying to print something that doesn't get printed during normal execution I got this working. I had to do a few things:
richard.kiss
richard.kissOP4mo ago
1. use Formattable trait https://docs.modular.com/mojo/stdlib/utils/format/Formattable instead of Stringable
Formattable | Modular Docs
The Formattable trait describes a type that can be converted to a stream of UTF-8 encoded data by writing to a formatter object.
richard.kiss
richard.kissOP4mo ago
2. change top level var constant-ish values to alias values (I also started using Optional instead of my home-grown wrapper, but not clear that was a problem)
Want results from more Discord servers?
Add your server