Settings to debug the contents of the library with VS Code

TL;DR Add "" justMyCode ": false" to the configuration of launch.json.

"justMyCode": false

background

There are many times when an open source library has too much scope for error messages to apply and you have to hit the source code yourself. GitHub has a jump function, and it is possible to manually follow the flow of the program on GitHub, but using the debug tool is overwhelmingly faster.

manner

Open VSCode, open console with F1 (or Ctrl + Shift + R, click),

Debug: Open launch.json

Type to open launch.json. Add "justMyCode": false under configuration.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": false #Add here
        }
    ],
}

By the way, json cannot be commented out, so in reality, you should not write below #.

I also tried the GUI method first, but it didn't work. Maybe it's just python.

Let's enjoy the library made by the giant while checking the contents of variables by placing breakpoints as you like.

reference

https://srbrnote.work/archives/4231

Recommended Posts

Settings to debug the contents of the library with VS Code
Setting to debug test by entering the contents of the library with pytest
Try Fortran with VS Code up to debug settings. [Win10]
Debug Python with VS Code
Try to get the contents of Word with Golang
Debug settings in virtual environment when using Pipenv with VS Code
VS Code settings
[Introduction to Python] How to sort the contents of a list efficiently with list sort
Edit the file of the SSH connection destination server on the server with VS Code
I tried to get the authentication code of Qiita API with Python.
I installed the library with Visual Studio Code, but Unable to import
I tried Flask with Remote-Containers of VS Code
Debug with VS Code using boost python numpy
Dump the contents of redis db with lua
The story of trying Sourcetrail × macOS × VS Code
Convert the character code of the file with Python3
How to make VS Code aware of the venv environment and its benefits
Add information to the bottom of the figure with Matplotlib
Change IP settings to ACL of conoha with python
[Introduction to Python] Basic usage of the library matplotlib
Remote debug Django environment created with docker-compose with VS Code
Edit and debug the code in the Raspberry Pi with VS Code's SSH connection feature
I tried to find the entropy of the image with python
Python with VS Code (Windows 10)
[Ubuntu] How to delete the entire contents of a directory
Settings when developing App Engine / Python apps with VS Code
How to debug the Python standard library in Visual Studio
Inherit the standard library to find the average value of Queue
Run the intellisense of your own python library with VScode.
Explain the code of Tensorflow_in_ROS
Set VS Code to PyCharm.
Try to automate the operation of network devices with Python
Debug by attaching to the Python process of the SSH destination
How to see the contents of the Jupyter notebook ipynb file
The story that Python stopped working with VS Code (Windows 10)
Check the code with flake8
Simulation of the contents of the wallet
Get the source of the page to load infinitely with python.
How to connect the contents of a list into a string
Try to extract the features of the sensor data with CNN
Generate error correction code to restore data corruption with zfec library
Process the contents of the file in order with a shell script
A story stuck with the installation of the machine learning library JAX
The story of not being able to run pygame with pycharm
Save the results of crawling with Scrapy to the Google Data Store
How to implement Java code in the background of RedHat (LinuxONE)
Become familiar with (want to be) around the pipeline of spaCy
I tried to automate the watering of the planter with Raspberry Pi
[python, ruby] fetch the contents of a web page with selenium-webdriver
How to get the ID of Type2Tag NXP NTAG213 with nfcpy
[EC2] How to install chrome and the contents of each command
First python ② Try to write code while examining the features of python
[Introduction to StyleGAN] I played with "The Life of a Man" ♬
Try to solve the N Queens problem with SA of PyQUBO
Read all the contents of proc / [pid] ~ From setgroups to wchan ~
I want to output the beginning of the next month with Python
Consider the speed of processing to shift the image buffer with numpy.ndarray
I wrote the code to write the code of Brainf * ck in python
Solving the Maze with Python-Supplement to Chapter 6 of the Algorithm Quick Reference-
Read all the contents of proc / [pid] ~ From cwd to loginuid ~
How to develop containers on remote servers with VS Code Remote-Containers