go to python cell in script from vs code interractive window

48 views Asked by At

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...

2

There are 2 answers

0
JialeDu On BEST ANSWER

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

0
rioV8 On

If you hover over the code in the interactive window you see a few buttons.

Press the one with the little arrow in the top-left corner, next to the trash bin