Closed Phippe closed 5 hours ago
can you show the terminal messages when you run npm run tauri build -- --debug
? This command should still work in v2.
PS D:\phili\dev\debug-build-bug> npm run tauri build -- --debug
> debug-release-build@0.1.0 tauri
> tauri build
Running beforeBuildCommand `npm run build`
> debug-release-build@0.1.0 build
> tsc && vite build
vite v5.4.11 building for production...
✓ 6 modules transformed.
dist/index.html 8.36 kB │ gzip: 3.46 kB
dist/assets/index-pSGieOOU.css 1.37 kB │ gzip: 0.65 kB
dist/assets/index-DdG3jFR9.js 1.11 kB │ gzip: 0.59 kB
✓ built in 183ms
Compiling debug-release-build v0.1.0 (D:\phili\dev\debug-build-bug\src-tauri)
Finished `release` profile [optimized] target(s) in 50.01s
Built application at: D:\phili\dev\debug-build-bug\src-tauri\target\release\debug-release-build.exe
Info Target: x64
Running candle for "main.wxs"
Running light to produce D:\phili\dev\debug-build-bug\src-tauri\target\release\bundle\msi\debug-release-build_0.1.0_x64_en-US.msi
Info Target: x64
Running makensis.exe to produce D:\phili\dev\debug-build-bug\src-tauri\target\release\bundle\nsis\debug-release-build_0.1.0_x64-setup.exe
Finished 2 bundles at:
D:\phili\dev\debug-build-bug\src-tauri\target\release\bundle\msi\debug-release-build_0.1.0_x64_en-US.msi
D:\phili\dev\debug-build-bug\src-tauri\target\release\bundle\nsis\debug-release-build_0.1.0_x64-setup.exe
thanks. Can you also share the scripts
section in package.json?
Should be short enough, so here's the whole package.json in case anything else is needed:
{
"name": "debug-release-build",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-shell": "^2"
},
"devDependencies": {
"@tauri-apps/cli": "^2",
"vite": "^5.3.1",
"typescript": "^5.2.2"
},
"packageManager": "pnpm@8.15.5+sha1.a58c038faac410c947dbdb93eb30994037d0fce2"
}
and tauri dev
still works fine? If not then something like a .cargo/config.toml that somehow forces release mode (if that exists) could have been possible, but if that works i really have no idea what the issue could be.
Maybe try updating npm, or try yarn or pnpm?
Right now you're the only person with this issue so there has to be something system specific i can't think of here 🤔
So, I've just tried different versions of Node and found some success with older versions:
(tauri dev
works fine, if this is still of relevance now)
There seem to be more people with the problem in the npm repo.
Mentioned workarounds include npm run tauri build "--" --debug
and npm run tauri build -- -- --debug
I still wonder why this seems to be only affecting a handful of users 🤔
Describe the bug
I wanted to debug the release build of my app using devtools, so I ran the command listed here, but it simply created a normal release build. I can't open any devtools, neither by right-clicking and inspecting nor pressing F12.
As far as I remember, this command used to work on Tauri 1.x.
Reproduction
npm create tauri-app@latest
and install all the packagesnpm run tauri build -- --debug
A normal release build will be created in the
src-tauri/target/release/bundle
directory. Asrc-tauri/target/debug/bundle
folder on the other hand doesn't even exist.Expected behavior
According to the docs, a new debug build should be created in
src-tauri/target/debug/bundle
, allowing the use of devtools.Full
tauri info
outputStack trace
No response
Additional context
No response