Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/content/docs/_ko/guides/debug/application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ WebView에서 우클릭한 후, `요소 검사`를 선택합니다. 이렇게

### 프로그래밍으로 Devtools 열기

[`Window::open_devtools`][] 및 [`Window::close_devtools`][] 기능을 사용하여 검사기 창을 제어할 수 있습니다.
[`WebviewWindow::open_devtools`][] 및 [`WebviewWindow::close_devtools`][] 기능을 사용하여 검사기 창을 제어할 수 있습니다.

```rust
use tauri::Manager;
tauri::Builder::default()
.setup(|app| {
#[cfg(debug_assertions)] // 디버그 빌드에만 이 코드를 포함
{
let window = app.get_window("main").unwrap();
let window = app.get_webview_window("main").unwrap();
window.open_devtools();
window.close_devtools();
}
Expand Down Expand Up @@ -105,5 +104,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
핵심 프로세스는 Rust로 구동되므로 GDB 또는 LLDB를 사용하여 디버깅할 수 있습니다. [VS Code에서 디버깅][] 가이드에 따라 LLDB VS Code 확장을 사용하여 Tauri 애플리케이션의 핵심 프로세스를 디버깅하는 방법을 알아볼 수 있습니다.

[VS Code에서 디버깅]: /ko/guides/debug/vs-code
[`Window::open_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.open_devtools
[`Window::close_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools
9 changes: 4 additions & 5 deletions src/content/docs/fr/guides/debug/application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ L'inspecteur est spécifique à la plate-forme, rendant le webkit2gtk WebInspect

### Ouverture de Devtools par programmation

Vous pouvez contrôler la visibilité de la fenêtre d'inspection en utilisant les fonctions [`Window::open_devtools`][] et [`Window::close_devtools`][] :
Vous pouvez contrôler la visibilité de la fenêtre d'inspection en utilisant les fonctions [`WebviewWindow::open_devtools`][] et [`WebviewWindow::close_devtools`][] :

```rust
use tauri::Manager;
tauri::Builder::default()
.setup(|app| {
#[cfg(debug_assertions)] // n'incluez ce code que sur les versions de débogage
{
let window = app.get_window("main").unwrap();
let window = app.get_webview_window("main").unwrap();
window.open_devtools();
window.close_devtools();
}
Expand Down Expand Up @@ -104,5 +103,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
Le processus Core est alimenté par Rust, vous pouvez donc utiliser GDB ou LLDB pour le déboguer. Vous pouvez suivre le guide [Débogage dans VS Code][] pour apprendre à utiliser l'extension LLDB VS Code pour déboguer le processus principal des applications Tauri.

[Débogage dans VS Code]: /fr/guides/debug/vs-code
[`Window::open_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.open_devtools
[`Window::close_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools
7 changes: 3 additions & 4 deletions src/content/docs/guides/debug/application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ The inspector is platform-specific, rendering the webkit2gtk WebInspector on Lin

### Opening Devtools Programmatically

You can control the inspector window visibility by using the [`Window::open_devtools`] and [`Window::close_devtools`] functions:
You can control the inspector window visibility by using the [`WebviewWindow::open_devtools`] and [`WebviewWindow::close_devtools`] functions:

```rust
use tauri::Manager;
tauri::Builder::default()
.setup(|app| {
#[cfg(debug_assertions)] // only include this code on debug builds
Expand Down Expand Up @@ -111,5 +110,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
The Core process is powered by Rust so you can use GDB or LLDB to debug it. You can follow the [Debugging in VS Code] guide to learn how to use the LLDB VS Code Extension to debug the Core Process of Tauri applications.

[debugging in vs code]: /guides/debug/vs-code
[`window::open_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.open_devtools
[`window::close_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools
9 changes: 4 additions & 5 deletions src/content/docs/zh-cn/guides/debug/application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ For more information about this error, try `rustc --explain E0425`.

### 通过程序打开 Devtools

您可以使用 [`Window::open_devtools`] 和 [`Window::close_devtools`] 函数来控制检查器窗口的可见性:
您可以使用 [`WebviewWindow::open_devtools`] 和 [`WebviewWindow::close_devtools`] 函数来控制检查器窗口的可见性:

```rust
use tauri::Manager;
tauri::Builder::default()
.setup(|app| {
#[cfg(debug_assertions)] // 仅在调试构建时包含此代码
{
let window = app.get_window("main").unwrap();
let window = app.get_webview_window("main").unwrap();
window.open_devtools();
window.close_devtools();
}
Expand Down Expand Up @@ -110,5 +109,5 @@ tauri = { version = "...", features = ["...", "devtools"] }
核心进程由 Rust 支持,因此您可以使用 GDB 或 LLDB 进行调试。您可以按照[在 VS Code 中调试]指南学习如何使用 LLDB VS 代码扩展来调试 Tauri 应用程序的核心进程。

[在 VS Code 中调试]: /guides/debug/vs-code
[`window::open_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.open_devtools
[`window::close_devtools`]: https://docs.rs/tauri/1/tauri/window/struct.Window.html#method.close_devtools
[`WebviewWindow::open_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.open_devtools
[`WebviewWindow::close_devtools`]: https://docs.rs/tauri/2.0.0-beta/tauri/webview/struct.WebviewWindow.html#method.close_devtools