how to debug python in visual studio

felisimo

I recently started working in python with visual studio and I have 2 questions please:

  1. Is there some kind of special configuration that you have to perform in order to be able to debug python code? Was I supposed to install something or did VS come this way?

  2. Suppose im in a decoding session, inside a function that's declared in the scope of some class. Can I view the values of the class variables defined in the init? If so, how? I tried to write "self.someField" in the watch window but it didn't work.

Thanks you!

Jack Zhai-MSFT

You could debug your python code like general debugging steps in VS, of course, it also has different settings or Environment options. If you want to get much more detailed information, please see this document here:

Debugging your Python code

In addition, one thread for one issue, for the second issue:

2.Suppose im in a decoding session, inside a function that's declared in the scope of some class. Can I view the values of the class variables defined in the init? If so, how? I tried to write "self.someField" in the watch window but it didn't work.

If possible, I suggest you open a new case for this new issue, you could also share your main code, so other community members could really repro this issue in their side.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

how to debug python in visual studio (how to step in a library)?

Visual Studio Code: How debug Python script with arguments

How to debug mpirun Python processes in Visual Studio Code on Ubuntu?

How to add custom Visual Studio debug view of Python object?

How to Debug QuantLib-Python module in Visual Studio

How to build OpenCV using Cmake/Visual Studio in Debug mode without Python debug library

python scripts debug in ROS with Visual Studio Code

How to debug a Visual Studio Package in a VSIX created in Visual Studio 2015

How to Debug Lua in Visual Studio Code

How to debug a dll using Visual Studio?

How to debug Karma tests in Visual Studio Code?

how to debug typescript files in visual studio code

How to debug QFixed in visual studio 2013

How to debug NUnit tests in Visual Studio 2022

how to debug effectively in visual studio 2017?

How to use visual studio code to debug django

how does visual studio debug optimization work?

How to debug TypeScript unit tests in Visual Studio?

How to debug a single thread in Visual Studio?

How to run application as administrator in debug with Visual Studio?

How to debug Ruby code on Visual Studio Code?

How to debug Azure Emulator in Visual Studio 2013

How to filter debug output window on visual studio?

How to debug javascript in visual studio 2015 RC?

How to debug a finally block in Visual Studio?

How to debug typescript jasmine tests in visual studio?

How to select debug profile in Visual Studio?

How to debug nuget package in visual studio

How to debug Cucumber in Visual Studio Code (VSCode)?