Skip to content

Add Windows and MacOS configuration section#4662

Open
Romerolweb wants to merge 3 commits intowailsapp:masterfrom
Romerolweb:patch-1
Open

Add Windows and MacOS configuration section#4662
Romerolweb wants to merge 3 commits intowailsapp:masterfrom
Romerolweb:patch-1

Conversation

@Romerolweb
Copy link

@Romerolweb Romerolweb commented Oct 23, 2025

Added configuration sections for Windows and MacOS in the IDEs guide.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Documentation
    • Enhanced the IDE setup documentation with platform-specific debugging configurations for Visual Studio Code on Windows and macOS. Developers now have access to tailored launch configurations for efficient debugging on both operating systems.

✏️ Tip: You can customize this high-level summary in your review settings.

Added configuration sections for Windows and MacOS in the IDEs guide.
@sonarqubecloud
Copy link

@leaanthony
Copy link
Member

Thanks. This will only apple to v2.10 of the docs. Please update the main docs (not versioned docs). Thanks 🙏

As requested by maintainer, adding the platform-specific configuration
sections to the main docs instead of just the versioned v2.10 docs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

The changes add Windows and macOS specific Visual Studio Code debugging configurations to IDE documentation. Windows configuration targets myproject.exe with a build task, while macOS configuration specifies GOOS=darwin, GOARCH=amd64, and a custom binary path.

Changes

Cohort / File(s) Summary
IDE Documentation
website/docs/guides/ides.mdx, website/versioned_docs/version-v2.10/guides/ides.mdx
Added Windows and macOS launch.json configuration snippets for Visual Studio Code debugging

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hop, hop! The configs now multiply,
Windows and Mac under the editor's eye,
Debug tasks aligned, the rabbit does cheer,
IDE guidance blooms throughout the year! 🎯

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete. It lacks issue reference, type of change selection, detailed testing information, test configuration output, and several unchecked critical checklist items. Include issue reference (Fixes #), select type of change, provide detailed testing steps and wails doctor output, update changelog, and address remaining checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Windows and macOS configuration sections to the IDE debugging guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@website/versioned_docs/version-v2.10/guides/ides.mdx`:
- Around line 69-86: The macOS launch.json is inconsistent with the build task
and hardcodes an incompatible GOARCH; update launch.json so its "program"
matches the binary produced by the build task (the same path used in tasks.json)
and remove the hardcoded "env": { "GOARCH": "amd64" } from launch.json (env in
launch.json only affects the debuggee, not the build). If you need to control
GOARCH for cross-building, move that setting into the build task's options.env
in tasks.json (or omit it entirely to use the host architecture), and ensure
"preLaunchTask": "build" produces the same output filename referenced by
"program".
♻️ Duplicate comments (1)
website/docs/guides/ides.mdx (1)

69-86: Same macOS mismatch as the versioned docs.
The macOS launch config points to build/bin/myproject, but the shown build task outputs build/bin/myproject.exe, and GOARCH is hardcoded to amd64. Please align the macOS docs with a macOS-specific build output and arch (arm64 on Apple Silicon or host default).

VS Code Go debugger launch.json macOS GOARCH GOOS recommended settings and whether to omit GOARCH

Comment on lines +69 to +86
### MacOS configuration

```json title="launch.json"
{
"version": "0.2.0",
"configurations": [
{
"name": "Wails: Debug myproject (macOS)",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/build/bin/myproject",
"preLaunchTask": "build",
"cwd": "${workspaceFolder}",
"env": {
"GOOS": "darwin",
"GOARCH": "amd64"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat "website/versioned_docs/version-v2.10/guides/ides.mdx" | head -120

Repository: wailsapp/wails

Length of output: 2956


🌐 Web query:

VS Code Go debugger launch.json macOS GOARCH environment variable best practices

💡 Result:

Best practices: GOARCH in VS Code Go debug (launch.json) on macOS

  1. Don’t set GOARCH unless you truly need it.
    For normal local debugging, let Go/Delve use your host defaults (Apple Silicon: darwin/arm64; Intel: darwin/amd64). GOARCH is primarily a build target selector (often paired with GOOS). [2]

  2. If you do set GOARCH, ensure the whole toolchain matches (Go + dlv + the binary).
    Debugging generally assumes the compiled binary matches the architecture Delve is running under. Practically:

    • Apple Silicon: prefer GOARCH=arm64 and an arm64 dlv.
    • If you need to debug an x86_64 (amd64) build on Apple Silicon, use a consistent x86_64 toolchain (often meaning running the relevant tools under Rosetta and using an amd64 dlv). (Mixing arch is a common cause of “breakpoints don’t hit / weird debugger behavior”.)
  3. Use env / envFile correctly: they apply to the debuggee process environment.
    In launch.json, env defines environment variables passed to the launched program, and it merges with envFile (and go.toolsEnvVars) with precedence env > envFile > go.toolsEnvVars. [1]

  4. If you need a different GOARCH only for the build, build in a preLaunchTask and debug with "mode": "exec"—don’t rely on launch.json env to affect the build step.
    The VS Code Go docs explicitly note that settings like env in launch.json apply to running the compiled binary, not building it—so put build env/flags in the task. [3]


Example: build amd64 binary via task, then debug it (recommended pattern)

.vscode/tasks.json

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "go: build (debug, amd64)",
      "type": "shell",
      "command": "go",
      "args": ["build", "-gcflags=all=-N -l", "-o", "${workspaceFolder}/__debug_bin_amd64", "./cmd/myapp"],
      "options": {
        "env": { "GOARCH": "amd64" }
      }
    }
  ]
}

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug exec (amd64 build)",
      "type": "go",
      "request": "launch",
      "mode": "exec",
      "program": "${workspaceFolder}/__debug_bin_amd64",
      "preLaunchTask": "go: build (debug, amd64)"
    }
  ]
}

Sources: VS Code Go debug config env/envFile behavior [1]; what GOARCH does for builds [2]; why build env should live in the pre-launch task (launch env doesn’t apply to building) [3].


macOS launch config is inconsistent with the shown build task and hardcodes incompatible GOARCH.

The generic tasks.json builds to build/bin/myproject.exe, but the macOS launch.json targets build/bin/myproject (no .exe), causing a mismatch. Additionally, hardcoding GOARCH: "amd64" fails on Apple Silicon (arm64 hosts). If GOARCH must differ for builds, it belongs in the task's options.env, not in launch.json (where env only affects the debuggee process, not the build). For local debugging on macOS, omit GOARCH entirely to use the host default, or conditionally set it based on the actual machine architecture.

💡 Proposed doc fix (align macOS config with proper build/arch handling)
 ### MacOS configuration
 
+Before using this configuration on macOS, ensure your build task outputs to `build/bin/myproject` (without `.exe`),
+and remove the hardcoded `GOARCH: "amd64"` to use your machine's native architecture (arm64 for Apple Silicon, amd64 for Intel).
+Alternatively, if a specific `GOARCH` is needed, define it in your `tasks.json` build command instead of `launch.json`.
+
 ```json title="launch.json"
 {
     "version": "0.2.0",
🤖 Prompt for AI Agents
In `@website/versioned_docs/version-v2.10/guides/ides.mdx` around lines 69 - 86,
The macOS launch.json is inconsistent with the build task and hardcodes an
incompatible GOARCH; update launch.json so its "program" matches the binary
produced by the build task (the same path used in tasks.json) and remove the
hardcoded "env": { "GOARCH": "amd64" } from launch.json (env in launch.json only
affects the debuggee, not the build). If you need to control GOARCH for
cross-building, move that setting into the build task's options.env in
tasks.json (or omit it entirely to use the host architecture), and ensure
"preLaunchTask": "build" produces the same output filename referenced by
"program".

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

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.

2 participants

Comments