Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Debugger with VSCode

Ashwin Naren edited this pageFeb 15, 2025 ·4 revisions

With LLDB plugin, we can useVSCode debugger GUI with a rust software.

Interaction mode

image

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.

image

Run a single file

For the most of cases, we want to repeat the test a few more times. Open settings and editargs field to your test file.

image

Run a CPython unit test

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 usingtest command, running a test file will be a little bit better.

Suppose we want to run,

cargo runLib/test/test_dict.py -k test_literal_constructor -v

Then the settings will be like:

image

Sometimes it is not possible. Then runningtest command is easier option.

cargo run -- -m test test_json -v

image

IMPORTANT TIP

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

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp