How to apply multiple cwd entries for ssh debugging?
See original GitHub issueCurrently there is only one cwd
from the launch config mapped to one from ssh.cwd
.
Commonly multiple ones are needed…
I suggest to keep the current ssh.cwd but mark it as deprecated (this way people’s configuration doesn’t break after an update but have the change to adjust and not use that when creating a new setup) and add a new configuration ssh.pathSubstitutions
(map paths between the host machine and the local one; the MS extension names that sourceFileMap
so we may use that, too - but it should be placed under ssh
to keep the correct scope).
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Debugging with SSH - CircleCI
To start a job with SSH enabled, select the 'Rerun job with SSH' option from the 'Rerun Workflow' dropdown menu. Note: The Rerun...
Read more >Debugging in Visual Studio Code
If you need to enter multiple lines, use Shift+Enter between the lines and then send all lines for evaluation with Enter. Debug Console...
Read more >QRadar: Enable Debugging Mode in SSH to Troubleshoot ...
To enable SSH debug, run the SSH command with the -v, -vv, or -vvv option: In this example, you can see what a...
Read more >Remote Debugging of a .Net Core application with VS Code ...
ssh folder is located. The directory must not be writeable by the group. So if we would use the home directory of the...
Read more >How can i attach to a remote C++ application? #78 - GitHub
Then, get the process id of the remote process (using ps -e over ssh or whatever your favorite access mechanism is) and set...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s a good question which answer is necessary to understand, so “let’s doc a bit”.
Yes - there is a reason. The regular
pathSubstitutions
are given to GDB and tell it how to relate the source references in the debug info to the actual files on the machine (so GDB can find them).If you use GDB remote debugging, the debug info needs to either be on the host machine or is copied over the connection, GDB then maps the source entries to the host machine where it runs on. You only need the source on the host and need the debug symbols either on the host or have a connection where GDB can download them as-needed [or you have a debugserver but then GDB will download it from there].
With the
ssh
options GDB runs on the ssh-target, it may still need path substitutions on the ssh-target to find the source there.ssh.pathSubstitutions
will then map what GDB has as file reference on the ssh-target machine to the place where vscode runs. Debug info is only needed on the host (which may save a lot of bandwith), source files are needed on both the host and the ssh-target. [again: GDB, now running on the ssh-target may get those from a debugserver; and as a special case GDB may only run on the ssh-target but is connected to another machine itself so the ssh-target may not even run the inferior; and yes, that’s sometimes needed because the only way you get to the “real” target is to use a ssh connection to kind of a proxy].Is there a reason that the regular
pathSubstitutions
configuration wouldn’t meet those needs? The MSsourceFileMap
is the equivalent of thepathSubstitutions
configuration in this extension. I don’t believe there is a specialsourceFileMap
configuration for thepipeTransport
in the MS extension.