PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

VS2017 Debug Error: An unexpected error occcurred

Open Ashok12698 opened this issue 3 years ago • 5 comments

Describe the bug Running python script debug on Visual Studio 2017 (Python3.9 environment)

Steps to Reproduce

  1. running python script "debug'

Expected behavior [A clear and concise description of your expectation] image

Additional context and screenshots [Add any other information such as screenshots, error message, or stack trace]

Sample Code

XXX

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: [Can be found under "Help->About Microsoft Visual Studio"] VS2017 Professional PTVS version: [Can be found under "Help->About Microsoft Visual Studio->Installed products->Python with Pylance"] Python version: Debugger Type (if applicable): [New debugger or legacy debugger?]

Microsoft Visual Studio Professional 2017 (2) Version 15.9.50 VisualStudio.15.Release/15.9.50+28307.2094 Microsoft .NET Framework Version 4.8.04084 Installed Version: Professional Visual C++ 2017 00369-60000-00001-AA036 Microsoft Visual C++ 2017 ASP.NET and Web Tools 2017 15.9.04012.0 ASP.NET and Web Tools 2017 C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Cookiecutter 15.9.18254.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format. JavaScript Language Service 2.0 JavaScript Language Service Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package MLGen Package Extension 1.0 MLGen Package Visual Studio Extension Detailed Info NuGet Package Manager 4.6.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/. ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info Python 15.9.18254.1 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers. Python - Profiling support 15.9.18254.1 Profiling support for Python projects. Python - VC Project Support 15.8.18116.3 Provides support for launching C++ projects with Python debugging enabled. Test Adapter for Boost.Test 1.0 Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory. Test Adapter for Google Test 1.0 Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory. Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Visual C++ for Linux Development 1.0.9.28307 Visual C++ for Linux Development Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake VisualGDB 5.5 Allows developing and debugging Embedded, Linux, Android and other GCC/GDB-based applications with Visual Studio.

Diagnostics file The diagnostics file contains information such as the Python version, environments, loaded assemblies, configuration options, etc. This file makes it easier for us to reproduce and fix bugs, so we would really appreciate it if you could provide it to us. This file can be generated by going to Tools->Options->Python->Diagnostics. You can attach the file to this issue or email it to us at [email protected]. If you email it, please add a link to this issue.

XXX

Ashok12698 avatar Sep 12 '22 03:09 Ashok12698

Hi there, can you check your Python version in the selected environment? We no longer support Python 2.x and that might be the issue. Thanks! 😊

StellaHuang95 avatar Sep 13 '22 18:09 StellaHuang95

Hi there, can you check your Python version in the selected environment? We no longer support Python 2.x and that might be the issue. Thanks! 😊

Hi, I have setup both the environment py 2.x and 3.9 but debug run on py2.x but not on py3.x. my preference is to use py3.x. the error comes on py3.x.

Ashok12698 avatar Sep 18 '22 08:09 Ashok12698

Hi, unfortunately it is not supported in the latest version of VS. Please see Blog Post on Python 2.7 support. Thanks!

StellaHuang95 avatar Sep 19 '22 17:09 StellaHuang95

Hi, unfortunately it is not supported in the latest version of VS. Please see Blog Post on Python 2.7 support. Thanks!

Hi, I am not concern about Python2.7. what I mean is I need it to be worked with Python3.* The error comes when I run debug in Python3.*.

Ashok12698 avatar Sep 19 '22 17:09 Ashok12698

I see, I will need more details to see what's really going on. Could you provide us the diagnostics file by going to Tools->Options->Python->Diagnostics?

StellaHuang95 avatar Sep 19 '22 18:09 StellaHuang95

Going to close this out. If the issue still persists, please reopen with the information requested. Thanks.😊

StellaHuang95 avatar Oct 18 '22 18:10 StellaHuang95