additionalSOLibSearchPath does not work for remote debugging

オープン
#8,344 コメント 1 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, typescript, vscode

調査の方向性

まず、launch.json に記載されている Windows-to-Linux のリモート SSH デバッグシナリオを再現し、additionalSOLibSearchPath と、文書化されている LD_LIBRARY_PATH の回避策を比較します。additionalSOLibSearchPath のみを構成した場合に、リモート実行ファイルが共有ライブラリを読み込み、デバッグが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

debugger

Bug type: Debugger

Description
additionalSOLibSearchPath is not respected in debuging session using remote debugger from windows to linux using ssh.

According to maintainer in vscode-remote-release the issue is in debugger, not in the remote extension, see https://github.com/microsoft/vscode-remote-release/issues/5748

Work around
is to use "environment": [{ "name": "LD_LIBRARY_PATH", "value": "/path_to_libImportantLib/" },

Details

  • VSCode Version:
    Version: 1.61.0 (user setup)
    Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
    Date: 2021-10-07T18:13:09.652Z
    Electron: 13.5.1
    Chrome: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Windows_NT x64 10.0.19042
  • Local OS Version:
    OS: Windows_NT x64 10.0.19042
  • Remote OS Version:
    LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
    Distributor ID: CentOS
    Description: CentOS Linux release 7.7.1908 (Core)
    Release: 7.7.1908
    Codename: Core
    Linux 3.10.0-1160.41.1.el7.x86_64 #1 SMP Tue Aug 31 14:52:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Remote Extension/Connection Type:
    SSH
  • Logs:

To Reproduce

  1. Compile an executable (exe_to_debug) on remote linux which depends on dynamic libraries in some path, eg /path_to_libImportantLib/ where libraries are found eg. libImportantLib.so
  2. Debug executable on remote linux with dynamic libraries but without setting additionalSOLibSearchPath
    --> gdb fails as expected, output in gdb terminal
    exe_to_debug: error while loading shared libraries: libImportantLib.so: cannot open shared object file: No such file or directory
  3. In Launch.json set
    "additionalSOLibSearchPath": "/path_to_libImportantLib/"
    Expected: Successful debugging
    Current Result: Same error as (2)
    `exe_to_debug: error while loading shared libraries: libImportantLib.so: cannot open shared object file: No such file or directory

Workaround:
Debugging works if I add following to Launch.json:

  "environment": [
    {
      "name": "LD_LIBRARY_PATH",
      "value": "/path_to_libImportantLib/"
    },
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。