Closed
Description
If you want to attach then you must manually adjust the "Python: Attach" launch config (or make a new one) with the appropriate information. However, it is unclear exactly what information the user is meant to provide. Any help is out-of-band since the launch config doesn't have any comments (I blame JSON). Here's what a user may specify:
- localRoot - ???
- remoteRoot - ???
- port - presumably the port to which VSC will connect (how?)
- secret - ???
- host - presumably where the process is running; maybe where something else is running instead (e.g. a debugger tied to the target process)
This may lead to at least the following questions for a user:
- what are
secret
,localRoot
andremoteRoot
? (I can guess at "secret", but have no clue on the other two) host
andport
imply the debugger will attach via a network socket, so...- what has to be running on the other end? (e.g. ssh, https, detached debugger)
- how do I start that? (making this easier is a separate matter; see Make it easier to set things up for attach. #1380)
- how do I specify which process I want to attach? (there is no
pid
option in the config) (see Support debugging a "pristine" process. #1381)
- did the target process need to be started in a special way (e.g. via the debugger and then detached)?
- what if I want to debug an existing process that wasn't started in a special way?
Indirectly:
- what is
attach
going to do? (connect to a detached debugger? start a debugger in an already running process?) - how will VSC reach the host (if not localhost)? (e.g. ssh, http)
Documentation on this would be great (maybe I missed it). However, it won't be quite as useful for the user trying to use attach
since the launch config can't point them there. I'm not sure we can do much about that.
(this is related to #1378)
Environment data
- VS Code version: 1.22.1
- Extension version (available under the Extensions sidebar): 2018.3.1
- OS and version: Ubuntu 16.04
- Python version (& distribution if applicable, e.g. Anaconda): n/a
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a
- Relevant/affected Python packages and their versions: n/a
Actual behavior
see above
Expected behavior
see above
Steps to reproduce:
n/a
Logs
n/a