Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Using the @debug macro disables the cell's stop button

Open paulbthub opened this issue 1 year ago • 0 comments

This isn't a visible problem if the cell completes execution in a few seconds, but if the @debug macro (or @warn or @error or @info) is invoked from inside a large or infinite loop, then first, the page starts running extremely slowly (I'm guessing because the logs are getting overwhelmed?) and second, the only way that I've found to stop execution is to go out to the terminal and hit ctrl c. Then you have to restart Julia, reload Pluto, reload the notebook and try to stop the errant cell before it hits the loop again, or, failing that, try to comment out or delete the line with the problematic @debug, do a ctrl s to save the cell -- and then restart everything again and hope that the edit has stuck.

Obviously this is unsatisfactory(!) so I'm hoping this can be easily fixed?

EDITED TO ADD --

system info, sample notebook file and screencap video of problem issue

Pluto v0.19.25 Julia 1.8.5 Ubuntu 22.04 Firefox 113.0.1 64 bit

The attached Fascinating.invention.jl.txt file is a notebook with some nonsense code and a small array to give Pluto/Julia something to chew on. The cell runs fine with @debug i commented out, but uncomment the 3rd line from the end and rerun the cell for 10 seconds or so and then try to stop/interrupt it and you'll see the behavior --

https://gist.github.com/paulbthub/a7c7e2e3561a3fca4c605bfa65f3de8f

Screencast from 05-17-2023 08:04:04 PM.webm

paulbthub avatar May 16 '23 10:05 paulbthub