microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.53k stars 676 forks source link

Start without Debug and Start with Debug button not available in right click menu #7429

Open dongzgh opened 1 year ago

dongzgh commented 1 year ago

"Start without Debug" and "Start with Debug" buttons not showing at all for stand alone python file

Steps to Reproduce

  1. Create any Empty Console application
  2. Create and add the new module.py into the project
  3. Open module.py
  4. In code editor right click to open the context menu
  5. "Start without Debug" and "Start with Debug" are not shown at all according to the article

Expected behavior The two buttons on the context menu shown without any problem in 2019, but not in 2022

Additional context and screenshots image

Sample Code

import sys
print(sys.path)

Diagnostics file Diagnostic Info 2023-03-01T181944.txt

int19h commented 1 year ago

This does not reproduce for me in Python projects. Looking at the log, it sounds like all the project files in your solution are .vcxproj, so this is a C++ project with a Python file in it? If so, this would be expected behavior - each project system is in charge of running things in its own project, and, of course, the C++ one wouldn't know what to do with Python.

dongzgh commented 1 year ago

@int19h It works in VS2019, but not VS2022.