0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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.97.2-1739406807_amd64.deb

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

$ which code
/usr/bin/code

$ code --version
1.97.2
e54c774e0add60467559eb0d1e229c6452cf8447
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?