简体   繁体   中英

Is there any way(by setting or extension) to view and use variables in VSCODE other than setting breakpoints. likes Spyder?

As I know ,I can view variables in vscode by setting breakpoints, Is it possible to view and use the variables likes Spyder in Console?
Such as the picture posted bellow: the running result variable "line" can be viewed and used in Console tab. The variables in the script can be easily viewed and used in Console after running it.(also can be viewed in variable explorer)

So, Is there any way(by setting or extension) to view and use variables in VSCODE other than setting breakpoints. likes Spyder ,.
Any help will be appreciate.

在此处输入图片说明

In VSCode, there are two ways to view script variables besides setting breakpoints:

  1. Open the " OUTLINE " column in the lower left corner of VSCode:

    在此处输入图片说明

  2. Right-click " Run Current File in Python Interactive Window " in the script, and select " Show variables active in jupyter kernel ":

    在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM