0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Tauri] VSCodeからのデバッグ

Posted at

公式の情報 に従い、
.vscode/launch.json,.vscode/tasks.json を作成する。

コメントに従って、tasks.jsoncommand を、
src-tauri\tauri.conf.jsonbeforeDevCommand,beforeBuildCommand へ書き変える必要がある事に留意。

  • e.g. npm の場合は、以下の様に変更をする。
- // change this to your `beforeDevCommand`:
- "command": "yarn",
- "args": ["dev"]
+  "command": "npm run dev",

デバッグ版/リリース版の選択を行い、

image.png

F5 でデバッグを開始すると、アプリが起動する。

note


この方法では、VSCode上では、バックエンド(Rust)側しかデバッグできない。
フロントエンド(React)側のデバッグは、アプリの右クリックから、開発者ツールを出して行う。


println,dbgなどによるコンソール出力の結果は、
VSCode のターミナルへ、出力される。

println!("Test");

image-1.png


npm run tauri dev でのデバッグと異なり、
ソースを変更しても自動での再ビルドは走らない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?