LoginSignup
0
1

More than 1 year has passed since last update.

Ubuntu: Visual Studio Code の使い方

Last updated at Posted at 2023-01-27

Ubuntu 22.10 で Visual Studio Code を使う方法です。

インストール

deb ファイルをこちらからダウンロードします。
Visual Studio Code on Linux

sudo dpkg -i code_1.74.3-1673284829_amd64.deb

インストールできたことを確認

$ which code
/usr/bin/code

$ code --version
1.74.3
97dec172d3256f8ca4bfb2143f3f76b503ca0534
x64

起動

code

サンプルプログラムの実行

sample.py
import sys
sys.stderr.write("*** 開始 ***\n")
print(sys.version)
print("Hello World")
print("こんにちは")
for it in range(5):
    print("テスト %d" % it)
sys.stderr.write("*** 終了 ***\n")

image.png

実行結果

$  cd /home/uchida/tmp/jan27 ; /usr/bin/env /bin/python /home/uchida/.vscode/extensions/ms-python.python-2022.20.2/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 44905 -- /home/uchida/tmp/jan27/print\(\"Hello\ World\"\).py 
*** 開始 ***
3.10.7 (main, Nov 24 2022, 19:45:47) [GCC 12.2.0]
Hello World
こんにちは
テスト 0
テスト 1
テスト 2
テスト 3
テスト 4
*** 終了 ***
0
1
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
1