question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The representation of a variable introspected in the Debug Console can be clipped on VSCode.

See original GitHub issue

Type: Bug

Please look at the picture:

image

In case you need it:

df = pd.DataFrame(
    [
        ['A', 'short text', 1],
        ['A', '1 very 2 very 3 very 4 very 5 very 6 very 7 very 8 very 9 very 10 very text', 2],
        ['A', 'not so long text', 3],
    ], columns=['first', 'description', 'last']
)
df
  first                                        description  last
0     A                                         short text     1
1     A  1 very 2 very 3 very 4 very 5 very 6 very 7 ve...     2
2     A                                   not so long text     3
len(df)
3
df.iloc[-1]
first                         A
description    not so long text
last                          3
Name: 2, dtype: object
pd.options.display.max_colwidth = None
df
  first                                        description  last
0     A                                         short text     1
1     A  1 very 2 very 3 very 4 very 5 very 6 very 7 ve...     2
2     A                                   not so long text     3
df['not existing column']
Traceback (most recent call last):
  File "/home/vagrant/miniconda3/envs/42-proposal-create-a-new-use-case-for-power-savings/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3621, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'not existing column'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/vagrant/miniconda3/envs/42-proposal-create-a-new-use-case-for-power-savings/lib/python3.8/site-packages/pandas/core/frame.py", line 3505, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/home/vagrant/miniconda3/envs/42-proposal-create-a-new-use-case-for-power-savings/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
    raise KeyError(key) from err
KeyError: 'not existing column'

Extension version: 2022.14.0 VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:03:37.738Z) OS version: Windows_NT x64 10.0.19042 Modes: Sandboxed: No Remote OS version: Linux x64 3.10.0-1127.el7.x86_64

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
karthiknadigcommented, Oct 6, 2022

@fabioz I can move it into the vscode repo, if this turns out to be a vscode issue.

0reactions
fabiozcommented, Oct 28, 2022

@roblourens one thing to note is that in this use case he has disabled word-wrap in the debug console – and in https://github.com/microsoft/debugpy/issues/1078#issuecomment-1285080300 there are some other strange things in his use case.

I’ve been able to reproduce getting different heights in this case (but I haven been able to reproduce the case where this makes a clip as in the report).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
Advanced Visual Studio Code for Python Developers
In this tutorial, you're going to look at how to get the most out of VS Code for Python development. During this tutorial,...
Read more >
Copying variable contents to clipboard while debugging in ...
In the debug console, write var tmpJson = JSON.stringify(yourJsonObject) ... It would be great to have this properly built-in with vscode.
Read more >
Untitled
20 Amazon Online Assessment Debugging Test Tips with Practice Questions and Answers You can increase your chances of doing well in the Amazon...
Read more >
Kogito Documentation
You can interact with the Kogito Management and Task Console to run the ... The VSCode extension in the Kogito Business Modeler Hub...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found