VS Code python extension will modify my data in Python script when i debug with it
See original GitHub issueEnvironment data
- VS Code version: 1.19.3
- Extension version (available under the Extensions sidebar): 2018.4.0 (2 May 2018)
- OS and version: windows 10
- Python version (& distribution if applicable, e.g. Anaconda): python 3.5.2
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: XXX
the VS Code IDE will modify my property in Python script when i debug with it. my test code as below
bytesIO = io.BytesIO(...)
bytesIO.seek(0)
print(bytesIO.realine()) # will output the first line
Actual behavior
print(bytesIO.readline())
output nothing.
Expected behavior
print(bytesIO.readline())
will output the first line.
if i add bytesIO.seek(0)
after i watch the variable by vs code ide, the output is right. I wander if the IDE has modified the data inside the bytesIO
object, such as it called its iterator and changed the position flag inside the object.
hope it helps!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Debugging configurations for Python apps in Visual Studio Code
The Python extension supports debugging of several types of Python applications. ... You can modify configurations (to add arguments, for example), ...
Read more >Editing Python in Visual Studio Code
The Python extension adds the following refactoring functionalities: Extract Variable, Extract Method, Rename Module, and Sort Imports. Extract Variable.
Read more >Get Started Tutorial for Python in Visual Studio Code
A Python hello world tutorial using the Python extension in Visual Studio Code ... to VS Code as a Python environment, primarily how...
Read more >Python in Visual Studio Code
You can configure the Python extension through settings. ... Set breakpoints, inspect data, and use the debug console as you run your program...
Read more >Using Python environments in VS Code
The Python extension uses the selected environment for running Python code (using the Python: Run Python File in Terminal command), providing language services ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If an object implements
__iter__
and is NOT an instance of following collection types:list, tuple, bytearray, range, dict, set, frozenset, xrange, buffer
, only then we don`t consume the iterator (while building the repr).Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.