Skip to content

customTool launch configuration is not listed on dartcode website, and VS Code says it's not valid #4539

@sschmitz41

Description

@sschmitz41

I have a Dart-based macOS service that offloads some work to a native FFI plugin. The plugin requires root privileges to perform some tasks. When the service is properly installed in /Library/LaunchDaemons, it runs with root privileges and functions correctly. However, when launching the service in the VS code debugger, those tasks fail because the debug session is not privileged.

From the VS code level, it seems the answer to this problem is either:
(1) Launch VS code as superuser. Running apps as root in macOS rarely works besides being frowned upon and I've encountered basic debugging issues trying to do so.
(2) Farm it off to the extension. I've found that the Go extension supposedly has an "asRoot" setting for launch.json configurations though I haven't confirmed that.

I propose adding a Dart Code launch config setting to launch a debug session with sudo. A reasonable prerequisite is adding the user to sudoers to avoid any password prompts (we develop this way with Xcode).

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin docs / websiteRelates to documentation, including the Dart Code websiteis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions