Template Usage When Creating A Project

Steve Arndt 0 Reputation points
2023-06-06T02:05:52.4833333+00:00

Playing around creating a Web App in VS that includes html, css, and javascript. The template I initially used was a Python template. It keeps wanting me to set the Startup file and forces me into a cmd whenever I try to run debug. I added an empty .py file to the project but I don't have any python code in the code yet and it appears to be choking on the DOCTYPE HTML statement. Is there anyway to easily rectify this so that when I debug and want to run in a browser it does so immediately without crashing with errors? Do I need to convert the HTML code to Python? Is there a template that I can use that would allow me to run the app in Windows, Android and IOS without any overhead of other programming flavors (like DJANGO)? And if there is, can I add Python to it later?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,449 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,098 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-06-06T06:46:05.29+00:00

    Hi @Steve Arndt

    Welcome to Microsoft Q&A! 

    You can right click on your .py file and select Set as Startup File.

    For more details, please refer to: Quickstart: Create your first Python web app using Visual Studio

    Sincerely,

    Anna


    If the answer the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.