How to configure execution arguments for mojo-lldb in VSCode
Is there a way to pass command-line parameters to the Mojo debugger, so that the following code prints out:
I'm looking for the
launcher.json
configuration that would be equivalent to:
So that I can get the code below:
debug_mode.mojo
To print out the following, when I Start Debugging
I believe this is the correct json block to edit, but I cannot find the correct parameters to configure.
as you can see I've tried setting "args": ["-D", "DEBUG"],
, but that sets the command line arguments for debug_mode.mojo
.
If this can only be done in another way, please can someone direct me to the path of enlightenment.3 Replies
You can invoke it by hand,
mojo-lldb
, and that opens up some features that vscode doesn't really expose properly, like disassembling functions.is lldb the default debugger for mojo? I ran into it as I’ve been brute forcing my way thru mojo 😂 idk what the best way to learn programming is but I learn best thru trial by fire pun intended
mojo-lldb
is the one you should start with. Occasionally mojo-lldb
breaks and you have to go get gdb out since it often doesn't have the feature that is causing the crash.