Skip to content

chore: open DevTools if env DEV_TOOLS is set#39

Merged
sergioramos merged 1 commit into
mainfrom
38-development-experience-for-debugging-automatically
May 26, 2023
Merged

chore: open DevTools if env DEV_TOOLS is set#39
sergioramos merged 1 commit into
mainfrom
38-development-experience-for-debugging-automatically

Conversation

@cguedes

@cguedes cguedes commented May 25, 2023

Copy link
Copy Markdown
Collaborator

This PR adds two startup scripts for tauri dev

  • yarn tauri:dev to run the Tauri app in dev mode (for consistence with the other command)
  • yarn tauri:dev:debug to run the Tauri app in dev mode with the developer tools opened

This feature is implemented by checking for the presence of the environment variable DEV_TOOLS (in main.rs).

Also updates the README.md file with these instructions.

The advantage of this solution (over a global shortcut) is that it simplifies the discoverability of the command by having it listed in the package.json startup scripts. And we can easily extend the available options by adding new scripts.

Related to #38

- Startup scripts for tauri dev (with debug)
   - creates `yarn tauri:dev` and `yarn tauri:dev:debug`
- updates README.md
@cguedes cguedes linked an issue May 25, 2023 that may be closed by this pull request
@cguedes cguedes requested review from sehyod and sergioramos May 25, 2023 10:56
@sergioramos sergioramos changed the title Open devtools if env DEV_TOOLS is set chore: open DevTools if env DEV_TOOLS is set May 26, 2023
@sergioramos sergioramos merged commit e0f2a21 into main May 26, 2023
@sergioramos sergioramos deleted the 38-development-experience-for-debugging-automatically branch May 26, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Development experience for debugging (UI/JavaScript)

3 participants