Debug in VS Code
Esta página aún no está disponible en tu idioma.
This guide will walk you through setting up VS Code for debugging the Core Process of your Tauri app.
Prerequisites
Install the vscode-lldb
extension.
Configure launch.json
Create a .vscode/launch.json
file and paste the below JSON contents into it:
This uses cargo
directly to build the Rust application and load it in both development and production modes.
Note that it does not use the Tauri CLI, so exclusive CLI features are not executed. The beforeDevCommand
and beforeBuildCommand
scripts must be executed beforehand or configured as a task in the preLaunchTask
field. Below is an example .vscode/tasks.json
file that has two tasks, one for a beforeDevCommand
that spawns a development server and one for beforeBuildCommand
:
Now you can set breakpoints in src-tauri/src/main.rs
or any other Rust file and start debugging by pressing F5
.
© 2024 Tauri Contributors. CC-BY / MIT