LoginSignup
1
0

More than 1 year has passed since last update.

【Python】VS Code Run Without Debugging on macOS

Posted at

Code の Python プログラム 実行

以下のような方法があります.

  1. .ipynb ファイルを Jupyter Notebook 風に実行する
  2. Interactive cell を別タブで開く(# %% とスクリプトに書いて shift+Enter or ctrl+Enter)
  3. ドラッグで選択して shift+Enter
  4. Run メニューに有るコマンドを実行する.

Jupyter Notebook からの移行は1が便利です.最近使っているのは2です.3はあまり使っていません.

今回は4についての記事です.

もとのコマンドがうまく動かない

^ + F5 と書いてあるのですがうまく動きません.BetterTouchToolでも解決を試みましたがよくわかりません.
実行環境:macOS 10.15.4,Code Version: 1.55.2, Python 3.8.6.

解決方法

システム環境設定>キーボード>ショートカット(「ショートカット」で検索)>アプリケーション

と入ります.+で Visual Studio Code (Finder では Code) にショートカット

Run Without Debugging

を追加し,⌘Rを紐付けます.これで完了です.

1
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
1
0