0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Sourcetrail

Last updated at Posted at 2024-08-28

参考にした記事 (これ以上のことはしていません!)

実施したこと

  1. sourcetrailをPCにインストール
  2. VSCodeにプラグインを追加
  3. VSCodeでsourcetrail プラグインの設定
    3.1 settings.jsonを開く (Ctrl + ,)
    3.2 Extensions -> Sourcetrail Configurations
    3.3 enable "Start Server At Startup"
  4. VSCode上でサンプル用ファイル "main.cpp" "Sample.h"を作成
#include "sample.h"
#include 

using namespace std;
using namespace sample;

int main()
{
    Member m;
    
    m.registration( 20 );
}

void Member::registration(int Age)
{
    age = Age;
    std::cout << "registered Age:" << age;
}
namespace sample
{
    class Member
    {
    private:
        int age;
    public:
        void registration( int Age );
    };
}
  1. VSCode上でサンプル用ファイル "main.cpp" "Sample.h"がおかれたフォルダを開く
  2. プロジェクトの作成
    6.1 (VSCodeではなく) スタートメニューからsourcetrailを起動
    6.2 プロジェクトの作成 (プロジェクト名、プロジェクトの保存フォルダ、言語、解析するコードのフォルダ)

image.png
image.png
image.png

  1. VSCodeとの連携
    7.1 VSCodeからmain.cppを開き、registrationメソッドを選択し右クリック。Sourcetrail Send Locationをクリック
    本来はsourcetrail上でregistrationに関する解析結果が出るはずだが、自分の環境では"Sourcetrail - Cant send message: is sourcetrail running?" のエラーが出る

image.png

7.2 sourcetrail上からコードを見つけて"registration"メソッドの解析結果を見ることはできた
image.png

pythonの場合

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?