BetterWinTab ships with a completeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sgm1018/BetterWinTab/llms.txt
Use this file to discover all available pages before exploring further.
.vscode configuration that covers building, running, attaching, and hot-reloading the application. You can debug it through the VS Code task system, by launching it manually from PowerShell, or by pressing F5 to use the full coreclr debugger with breakpoints and the Debug Console.
Recommended: Run via VS Code Task
The fastest way to build and launch BetterWinTab for debugging is through the predefinedrun-x64 task, which builds and starts the app in one step.
Select run-x64
Choose run-x64 from the task list. This task depends on
build-x64, so it will automatically kill any running BetterWinTab process, rebuild the project for x64, and then launch the compiled executable.Manual Run from PowerShell
If you prefer working directly in a terminal, use this sequence to stop any existing instance, rebuild, and relaunch:Stop-Process call is a safety step — it ensures you are never running two instances simultaneously and that file locks are released before the next build writes new binaries.
Hot Reload
F5 Debugging with Breakpoints
For full debugger support — breakpoints, variable inspection, call stacks, and the Debug Console — use the VS Code launch configuration.Open the Run and Debug panel
Press Ctrl+Shift+D or click the Run and Debug icon in the Activity Bar.
Select the launch configuration
In the configuration dropdown at the top of the panel, select BetterWinTab (x64 Debug).
Start debugging
Press F5. VS Code will run the
build-x64 pre-launch task (which kills any running instance and rebuilds the project), then attach the coreclr debugger to the launched process.Launch Configuration (.vscode/launch.json)
The repository includes two configurations in .vscode/launch.json:
| Field | Value | Notes |
|---|---|---|
type | coreclr | Uses the .NET coreclr debugger provided by the C# extension |
preLaunchTask | build-x64 | Automatically kills and rebuilds before each debug session |
program | bin/x64/Debug/net8.0-windows10.0.19041.0/win-x64/BetterWinTab.exe | Points to the x64 debug output |
console | internalConsole | Routes Debug.WriteLine output to the VS Code Debug Console |
stopAtEntry | false | The process runs normally; debugger attaches after startup |
Debugging Tips
- Breakpoints in C# files — Click in the editor gutter beside any line in
.csfiles. Breakpoints work in all source files including XAML code-behind, view models, and Win32 interop helpers. - Debug Console output —
System.Diagnostics.Debug.WriteLine(...)calls in the source are visible in the VS Code Debug Console panel when running under theinternalConsoleconfiguration. - Inspecting the overlay — The BetterWinTab overlay is a WinUI 3 window that is shown and hidden based on the global hotkey. To trigger it during a debug session, make sure focus is not on VS Code when you press Ctrl+Tab, or reassign the activation hotkey from Settings → General to avoid conflicts.
- Native interop crashes — If the process exits unexpectedly at startup without hitting any managed breakpoint, confirm that you built with
-p:Platform=x64. A platform-neutral build will be missing the native WinUI host binaries and will crash before reaching managed code.