0

In Visual Studio Code, when debugging a python code (.py), is it possible to start an interactive session window interact with the program in that window?

It is suggested to "Add #%% at the top to indicate a Jupyter cell." This does start an interactive window, but the interactive session does not connect to the current .py file. It shows a pending sign when evaluating a variable in the interactive window.

I can evaluate a variable during a python debug session in the standard DEBUG CONSOLE window. But it will be nice to do everything in an interactive window without opening the debug console window.

Thank you!

current VS Code version: 1.98.0

asked Mar 12, 2025 at 15:01
3
  • Did you use debug cell? Commented Mar 13, 2025 at 3:17
  • @MinxinYu-MSFT Debug cell and F5 will run the code to the breakpoint, but I still cannot evaluate variables in the interactive window. Commented Mar 16, 2025 at 1:02
  • 1
    Python interactive window does not support run multiple codes at the same time. Commented Mar 17, 2025 at 6:15

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.