microsoft / microsoft/vscode-cpptools

How can I attach to a remote debug server without a PID or program name?

Open
#3,382 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted question
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

For example, debugging something on an iOS device from a laptop. When debugging an iOS process remotely with lldb, a debugserver instance runs on the remote host. debugserver is given a program to launch or a process to attach to, so the local lldb instance doesn't need any of this information. I've looked at Pipe Transport and it requires a PID. I see there is a command:pickRemoteProcess option, but where do I supply a way to start the remote server? Perhaps something with setupCommands?

Under the hood, Xcode communicates with the device and launches an instance of debugserver, supplying a port. If you're not familiar, the workflow by hand is something like this. On the remote host:

$ debugserver --attach=$pidOrProcessName *:12345
  Waiting for connection from *:12345...

On the local host:

$ lldb
(lldb) platform select remote-ios
(lldb) platform connect connect://$deviceIP:12345
<debugging starts>

Is this a supported configuration?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review Documentation/Debugger/gdb/PipeTransport.md and the handling of command:pickRemoteProcess and setupCommands. Trace how remote debug-server startup is represented for the iOS workflow; done means determining and documenting a supported configuration or identifying the missing integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
devtools, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.