https://code.visualstudio.com/docs/python/jupyter-support
파이썬 고르기
Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
Connect to a remote Jupyter server
You can offload intensive computation in a Jupyter notebook to other computers by connecting to a remote Jupyter server. Once connected, code cells run on the remote server rather than the local computer.
-
Run the Python: Specify Jupyter server URI command from the Command Palette (Ctrl+Shift+P).
-
When prompted, provide the server's URI (hostname) with the authentication token included with a ?token= URL parameter. (If you start the server in the VS Code terminal with an authentication token enabled, the URL with the token typically appears in the terminal output from where you can copy it.)
Debug a Jupyter notebook
The Visual Studio Code debugger lets you step through your code, set breakpoints, examine state, and analyze problems. Using the debugger is a helpful way to find and correct issues in notebook code.
-
In VS Code, activate a Python environment in which Jupyter is installed, as described at the beginning of this article.
-
Import the notebook's .ipynb file into VS Code as described in the previous section. (Download the file first if you're using a cloud-based Jupyter environment such as Azure Notebooks.)
-
Follow the instructions to configure and run the debugger as described on Tutorial - Configure and run the debugger, using your imported .ipynb file, of course, and setting a breakpoint in an appropriate location in your notebook code.
-
To familiarize yourself with the general debugging features of VS Code, such as inspecting variables, setting breakpoints, and other activities, review VS Code debugging.
-
As you find issues, stop the debugger, correct your code, save the file, and run the debugger again.
-
When you're satisfied that all your code is correct. Save the file, then export the notebook as described in the following section. You can then upload the notebook to your normal Jupyter environment.
'Programming > python' 카테고리의 다른 글
pandas에서 주의할점. np.where과 섞어쓰지 말자 (0) | 2019.07.09 |
---|---|
[python] argparse 구문 jupyter 에서 사용하기 (2) | 2019.05.27 |
[python] python, 32bit, 64bit 확인 (0) | 2019.04.01 |
[python] 파이썬 xlsx 쓰기, openpyxl (0) | 2019.03.19 |
[pandas] select rows form dataframe based on values in column (0) | 2019.03.15 |