Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Interactive Window Debugging with IPyKernel 6.0 #6818

Closed
2 tasks done
DonJayamanne opened this issue Jul 26, 2021 · 2 comments
Closed
2 tasks done

Testing Interactive Window Debugging with IPyKernel 6.0 #6818

DonJayamanne opened this issue Jul 26, 2021 · 2 comments

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jul 26, 2021

Refs: #6534

Complexity: 4

Create Issue


Debugging in Interactive Window was broken when using IPyKernel 6.

  • It would either open a new editor with the code the user ran & stop there (debugger stops)
    • This could be replicated only on Desktops
  • Or would open interactiveshell.py and stop there (debugger stops)
    • This could be replicated only on dev Containers

Changes were made to ensure both were fixed. First issue was a fix in Jupyter extension & second issue was fixed in the debugger package.

How to test:

Desktop Setup

  • Install VS Code Insiders
  • Install latest version of Python extension
  • Install Python 3.9 on Desktop
    • Use of non-conda is preferred as thats easier to setup and use.
  • Test 1: Test with old version of IPyKernel (validate the fact that we didn't break debugging with previous version)
    • Uninstall currently installed packages & install the older versions
      • python -m pip uninstall ipykernel ipython debugpy
      • python -m pip install ipython==7.15.0 ipykernel==5.5.5
    • Start interactive window
      • Create a Python file named sample.py
      • Add the following code
        # %%
        message = "Hello World"
        print(message)
      • Click the code lens Debug Cell
      • The interactive window will appear on the right & debugger will start
      • Verify debugger stops at the first line message = "Hello World"
  • Test 2: Test with latest version of IPyKernel (6.0)
    • Uninstall currently installed packages & install the older versions
      • python -m pip uninstall ipykernel ipython debugpy
      • python -m pip install ipython
    • Start interactive window
      • Create a Python file named sample.py
      • Add the following code
        # %%
        message = "Hello World"
        print(message)
      • Click the code lens Debug Cell
      • The interactive window will appear on the right & debugger will start
      • Verify debugger stops at the first line message = "Hello World"

Dev Container setup

  • Ensure you have docker up n running
  • Clone the repo https://github.com/DonJayamanne/testDebugPyInContainer
  • Open above folder in VS Code container
    • I.e. open folder in VS Code
    • Then when prompted to open in Container click yes
    • Ensure you select Python 3.9 as your workspace interpreter in python
      • Open a Python file, then wait for Python extension to actiavte.
      • You'll see the Python interpreter information on the bottom left statusbar)
      • Click that to change it to Python 3.9
  • Test 3: Test with latest version of IPyKernel (6.0)
    • Uninstall currently installed packages & install the older versions

      • <fully qualified path to python 3.9> -m pip uninstall ipykernel ipython debugpy
      • <fully qualified path to python 3.9> -m pip install ipython
      • The fully qualified path to python 3.9 should be /usr/local/bin/python,
        • You can validate this by using the Interpreter picker (path is displayed
          Screen Shot 2021-07-26 at 12 59 21
    • Start interactive window

      • Create a Python file named sample.py
      • Add the following code
        # %%
        message = "Hello World"
        print(message)
      • Click the code lens Debug Cell
      • The interactive window will appear on the right & debugger will start
      • Verify debugger stops at the first line message = "Hello World"
@stuartleeks
Copy link

stuartleeks commented Jul 27, 2021

Debugging in dev container worked with additional steps (#6836)

@roblourens roblourens removed their assignment Jul 29, 2021
@rzhao271
Copy link
Contributor

Closing based on #6818 (comment)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants