LoginSignup
6
2

[VS Code / Python] Variable Viewer で変数に格納された値を確認する

Posted at

はじめに

こんにちは。初心者エンジニアです。

私は Matlab を使っていたので、Python 開発では似た見た目の Spyder を使っていたのですが、Git と連携をスムーズにするために VS Code を用いることにしました。

Matlab や Spyder のように、都度変数の値を確認したいので、VS Code でそれを実現する方法を調べたのでまとめます。

方法

  1. コードエディタ上の任意の場所で右クリック
  2. Run in Interactive Window の Run current File in interactive Window (対話型ウィンドウで現在のファイルを実行する) を実行
    image.png
  3. Interactive タブが生成されるので、Variables (変数) を選択
    image.png
  4. Valuable viewer タブが表示される
    image.png

そのほか

  • 任意の変数をダブルクリックすると、変数の編集ができる。
    image.png

参考

6
2
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
6
2