Skip to content

Conversation

@ktnlvr
Copy link

@ktnlvr ktnlvr commented Apr 21, 2025

Closing #1269, document a rudimentary root debugging platform runner.

@louwers
Copy link

louwers commented May 25, 2025

This is way more complicated than just adding sudo to launch.json. Although yes I get it, that is hard to support.

@louwers
Copy link

louwers commented May 25, 2025

I don't think people using the extension necessarily have lldb-server installed.

@louwers
Copy link

louwers commented May 25, 2025

Where does the output show up?

You need to set

        "initCommands": [
          "platform select remote-linux", // For example: 'remote-linux', 'remote-macosx', 'remote-android', etc.
          "platform connect connect://localhost:1234",
          "settings set target.inherit-env false", // See note below.
          "settings set target.input-path /dev/tty",
          "settings set target.output-path /dev/tty",
          "settings set target.error-path /dev/tty"
      ],

### Root Debugging
Debugging as root on a local machine is possible only with a remote platform. On MacOS/Linux you should be able to prepend the standard platform command with `sudo`/`doas`/`rootdo`. The builtin terminal will prompt you for the credentials.
Copy link

Choose a reason for hiding this comment

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

Suggested change
Debugging as root on a local machine is possible only with a remote platform. On MacOS/Linux you should be able to prepend the standard platform command with `sudo`/`doas`/`rootdo`. The builtin terminal will prompt you for the credentials.
Debugging as root on a local machine is possible only with a remote platform. On macOS/Linux you should be able to prepend the standard platform command with `sudo`/`doas`/`rootdo`. The builtin terminal will prompt you for the credentials.

What is the 'standard platform command'?

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