Я использую VS Code на ПК с Windows 10 с установленным Python 3.7.3 и расширением Python. Я следовал инструкциям здесь (https://code.visualstudio.com/docs/pyth ... n-tutorial), чтобы создать тестовую папку с именем «hello» в C:\python_work\hello и создать программу под названием «hello.py». внутри этой папки. hello.py показан ниже. Я пробовал использовать отладчик, нажимая зеленую стрелку и F5, но ни один из них не помог отладчику работать должным образом. Мой файл «launch.json» также показан ниже.
hello.py:
Код: Выделить всё
msg = "Hello World!"
print(msg) # Breakpoint
Код: Выделить всё
{
// 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",
"stopOnEntry": true
},
]
}
Подробнее здесь: https://stackoverflow.com/questions/567 ... reakpoints