-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Debugger with VSCode
With LLDB plugin, we can use VSCode debugger GUI with a rust software.
RustPython project repository includes pre-defined debugger settings. In this guideline, we mostly will use the first one. By default, it will run an interpreter with interaction mode. This is useful when we want to test a small snippet; or when interpreter even doesn't start.
For the most of cases, we want to repeat the test a few more times. Open settings and edit args
field to your test file.
Here is a tip. Because we must run RustPython in debug mode, it will be slow. Cutting down the running time will be more pleasant if possible. Rather than using test
command, running a test file will be a little bit better.
Suppose we want to run,
cargo run Lib/test/test_dict.py -k test_literal_constructor -v
Then the settings will be like:
Sometimes it is not possible. Then running test
command is easier option.
cargo run -- -m test test_json -v
Don't forget to set break point. Sometimes panic is not very useful. If you are new to debuggers, please search for "VSCode breakpoint" for details. If you are already familiar with debuggers, click left side of line numbers to set breakpoints. Simple tip: Simply, click line