When writing a Nautilus Script (e.g. using Python), I currently am aware of two methods for basic debugging:
These methods work reasonably well, but I suspect that there are more effective methods that I am not aware of. Can anyone suggest other methods?
Edit:
Context: I sought methods to debug a python script launched from the Ubuntu right click menu in Nautilus.
Using cedric's answer of relaunching nautilus with --no-desktop option means that stderr and stdout becomes visible at the terminal window. However, this terminal does not appear to be usable as a pdb console for debugging (it seems to be output-only).
In my search for a way to get input and output access to the script process when launched from the right click menu, I found the information listed in my answer below.
(Also, while I agree that unit testing and logging is best practice, I would argue that there is still a place for interactive debugging, particularly with small scripts.)
What you asked for is just to see your script outputs, that can be done by relaunching nautilus with --no-desktop option:
$ nautilus -q
$ nautilus --no-desktop
This way you will see any outputs (stderr / stdout) made by your script or by the python interpreter. Should be usefull...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With