Skip to content

[v3] Add Delve debug support out of the box #5138

Description

@symball

Is your feature request related to a problem? Please describe.

The ability to inspect what is going on whilst developing software beyond printing lots of log statements is incredibly useful. Currently, due to the way wails runs development through a combination of atterpac/refresh and Taskfiles makes attaching a debugger difficult

Describe the solution you'd like

I propose adding a debug sub-command which is really just a way of loading a different refresh profile which in turn sets a var within the Taskfile to create a different execution flow such as

- |
        if [ "{{.DEBUG_MODE}}" = "true" ]; then
          echo "Running in debug mode"
          dlv exec {{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/MacOS/{{.APP_NAME}} --headless --listen=:2345 --api-version=2 --accept-multiclient 
        else
          echo "Running in normal mode"
          "{{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/MacOS/{{.APP_NAME}}"
        fi

Describe alternatives you've considered

For decent debugging of Go based programs, there isn't really anything better than Delve

Additional context

I'm not gonna lie, the implementation within #5137 is quite messy because I was figuring out the workings of wailsv3 at the same time

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestLinuxMacOSP2Medium priorityWindowsclistaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedv3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions