pythonvisual-studio-codejupyter-console

go to python cell in script from vs code interractive window


I am using vs code to run my python codes. I use the interractive window, and sometimes I get a bit lost when trying to find where in my script a cell displaying in the interractive window was run. Is there a way to go to cell script from the interractive window (illustration below)? illustration of my goal

I tried to check here keyboard shortkeys for interractive window, and I don't see it...


Solution

  • When you use #%% to execute a line or a segment of code in the Python script, Go To [*] will be displayed after the Run command. Click it will jump to the corresponding cell.

    enter image description here

    The reverse operation is the intermediate icon of suspended display in the upper right corner of the unit grid in the interactive window

    enter image description here