Закрыть
×
=0) { let js = text.slice(pos1, pos2); + '<\/' + "script" + '>'; arrText.push(js); // next pos1 = pos2; continue; } } } break; } return arrText; } function OpenDialog(parentDiv, urlContent) { parentDiv = document.getElementById('modal-background'); // new !!!!!!! parentDiv.appendChild(document.getElementById('modal-template')); document.getElementById('modal-background').style.display = "flex"; // !!!!! block document.getElementById('modal-template').style.display = "flex"; // !!!!! document.getElementById('modal-body').innerHTML = ""; post_url(urlContent, "", function(text_from_server) { var element = document.getElementById('modal-body'); element.innerHTML = text_from_server; // add scripts var arrJSText = get_scripts(text_from_server); for (var i=0; i
dir.by
Праздники ...
Праздники ...
Рождество (Католическое) 25 Декабря
Концерты, выставки ...
Концерты, выставки ...
Спектакль "Чудики"|||г. Минск 15 сентября, 26 сентября, 18 октября, 29 октября, 18 ноября 2026
Афишу
Спорт занятия ...
Спорт занятия ...
Танцы для детей с 2-х до 18 лет (современная хореография, уличные танцы, акробатика, брейкданс, Go-Go, ...)
Спорт занятие
Компьютер, программы...
Компьютер, программы...
Объявления ...
Объявления ...
Медицинские перевозки лежачих больных
Объявление
Новости ...
Новости ...
Форум ...
Форум ...
обсуждение...
<<
Поиск >>
Поиск
Концерты
Спорт
Форум
Компьютер
Компьютер, программы
→
Python
Создаем новое приложение с Python в Visual Studio Code. Отладка приложения. Смотрим в отладке как по шагам выполняется Python
посмотрели
7581
раз
обновлено: 7 February 2021
Step 1. Open Visual Studio Code
Если у вас не установлена
Visual Studio Code
нужно
установить Visual Studio Code ...
Открываем
Visual Studio Code
Step 2. Create a new folder my_python_project1 on disk
D:
and in the Visual Studio Code select this folder
Создаем новую папку
my_python_project1
на диске
D:
и
в
Visual Studio Code
нажимаем
File
→
Open Folder ...
и выбираем эту папку
D:/my_python_project1
Step 3. Create a new file main.py inside Visual Studio Code
Добавим код в
file D:/My/
my.html
print(
"Hello, world!"
)
Save the file for this click
File
→
Save
Step 4. Run the project in the debugger to do this click Run → Start Debugging (key F5)
Выбираем "
Python File
" (то есть запустить текущий Python файл)
Увидим что текст
"Hello, world!"
отобразился внизу
На заметку 1.
Создаем launch.json (выбираем путь к запускаемому файлу)
В параметре
program
write the path to the file to be launched у меня это файл
main.py
На заметку 2.
Если нету, то установим Python debugger
На заметку 3.
We set stopping points (Breakpoints)
Let's put breakpoints in the file
main.py
Breakpoints are set by pressing a key
F9
Run the project in the debugger to do this click Run → Start Debugging (key F5) и увидим значения переменных
Скачать пример
my_python_project1.zip ...
размер: 1 kb
Структура файлов:
D:/my_react_example1
main.py
.vscode
launch.json
файл настройки для Visual Studio Code (путь к запускаемому файлу)
Как запустить пример?
1) Открываем
Visual Studio Code
2) В
Visual Studio Code
нажимаем в меню
File
→
Open Folder
выбираем папку где распокавали проект
3) Click
Run
→
Run Debugging
или кнопку
F5
← Previous topic
Create a new Python application in a text editor and run it on the command line
Next topic →
How do you check in Python if an object has an attribute?
Your feedback ... Comments ...
Your Name
Your comment
(www links can only be added by a logged-in user)
+ Picture
•
Download and install Python for Windows
New app
Option 1. Create a new application in a text editor and run it on the command line
•
Create a new Python application in a text editor and run it on the command line
Option 2 (the best for me). Creating a New App in Visual Studio Code
•
Creating a new application with Python in Visual Studio Code. Debugging the application. See how Python is executed step by step in debugging
Python syntax, functions, classes
•
How do you check in Python if an object has an attribute?
Examples
•
Python example: "Open the XML file and read the sections and save it to the txt file"
•
Python example: "Download tasks from Redmine"
•
Python example: "HTTP server"
Sites to learn Python
•
Sites to learn Python
Ваши вопросы присылайте по почте:
info@dir.by