question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While debugging interactiveshell.py wont let go! the debugging only happens inside interactiveshell.py

See original GitHub issue

Bug: Notebook Editor, Interactive Window, Editor cells

Description

Basically, as you can see in the screencast below, whenever I try to debug a cell, I’ll face interactiveshell.py and instead the debugger wants me to debug this file and would not get out! no matter what I do! even if I keep pressing step-out, or if I press continue running until the next breakpoint, it just simply ends the debugging! Since this is along the line of my previous issue, microsoft/vscode-jupyter#1656 , I’m unsure if this is something typical and routine or not (to be honest I’m highly sckeptial if it is!)

Steps to cause the bug to occur

  1. write some code in a cell
  2. try to debug it!

Actual behavior

it stucks in the interactiveshell.py

Expected behavior

gets out of it and debug my code instead!

interactiveshell_pyIsCrazy

second screencast: interactiveshell_pyIsCrazy2

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Windows 10 WSL
  • Extension version: 2020.1.58038 (13 January 2020)
  • VS Code version: 1.41
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.7.3 (Anaconda3-2019.03-Linux-x86_64)
  • OS: Windows 10 WSL subsystem (distro): ubuntu 18.04
  • Virtual environment: conda

Developer Tools Console Output

https://gofile.io/?c=KeRuTl

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Jan 30, 2020

In the gifs, you’re hitting step over. That prevents it from stepping ‘into’ your code. Try hitting step into instead. It should eventually do something like this:

stepinto

You can see in the interactiveShell.py that it’s evaling and compiling the code of the cell that was sent. When it executes the code, that’s when you have to hit F11 (step into) instead of F10 (step over) if you want to step into your code.

If breakpoints were working (but they’re not), then you could just hit F5 to get to your breakpoints.

0reactions
Coderx7commented, Feb 2, 2020

Thanks a lot, I checked that, and yes, steping in, does go into my code, However, I also noticed, now, when in interactiveshell.py, F5 and step over work as well! While previously they were’nt working at all! I’m not sure what has happenened but its back to its former behavior!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to debug in Django, the good way? - Stack Overflow
There are a bunch of ways to do it, but the most straightforward is to simply use the Python debugger. Just add following...
Read more >
Chapter 6 - Using the Debugger - Invent with Python
To stop a program stuck in an infinite loop, you can press CTRL-C in the interactive shell. In fact, create an infinite loop...
Read more >
Debugging configurations for Python apps in Visual Studio Code
If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on...
Read more >
Chapter 10 – Debugging - Automate the Boring Stuff with Python
For example, enter the following into the interactive shell: ... raise statement inside a function and the try and except statements in the...
Read more >
How I Debug my Python Projects — Part 1: Raising Exceptions
Python Debugger Module; Python Jupyter Notebook. In this article, I will walk you through the first technique — Raising Exceptions. Raising ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found