Comments (11)
That's a fair point. We should probably call catch_warnings
on entry to the UI, then resetwarnings
, and then override showwarning
to direct Pudb's own log messages to its built-in console.
PRs implementing this would be welcome.
from pudb.
I mean, we really need to keep pudb's log level separate from that of the application, despite both of them running with the same Python runtime.
from pudb.
Sure. #650 was never going to help with logging, only warnings, sorry. PRs still welcome.
from pudb.
Ran into this while debugging a Flask app on linux. Would it be possible to ignore the logger.basicConfig settings to prevent this from happening?
from pudb.
Or just add --log-level
switch / setting? :-)
from pudb.
Huh, I just realized I am talking about warnings, while you are talking about logging. The two are distinct, and both need handling.
from pudb.
#650 handles the warning end of this.
from pudb.
Negative :-( still here :-( Its like loglevel DEBUG is enabled somehow o_O
from pudb.
Okay, this is caused by the Kivy framework that I use attaching to a root logger by default [1] thus also capturing pudb logger that also seems to attach to the root logger. Quck fix is to use PYTHON
or MIXED
mode in Kivy logger when working with pudb.
[1] https://github.com/kivy/kivy/blob/4a8caf561c37944a21bc004bf8faae2d8237e8a1/kivy/logger.py#L78
from pudb.
The approach I would prefer would be to swap out the logging configuration for one that logs to pudb's built-in console while the UI is active, similar to #650. Not at the top of my list, but PRs definitely still welcome.
from pudb.
Ran into this while debugging a Flask app on linux. Would it be possible to ignore the logger.basicConfig settings to prevent this from happening?
The problem is using root logger by both pudb and your application (Python uses object references not copies). In my case (Kivy) it was possible to change application behavior not to capture and dump everything from the root logger (see description above). That solved clobbered display for me. I guess Flask can be configured in a similar way but I have no experience with Flask sorry.
I guess the best solution would be setting up some sort of internal logger (handler) dedicated for pudb and use its output only in built-in console.
from pudb.
Related Issues (20)
- remote debugging - Cannot disable application log message from garbling up the PuDB UI screen HOT 3
- Pudb UI Exception Encountered: Object 'A' appears to be a sequence, but does not behave like one: iteration over a 0-d tensor HOT 1
- Disable "view output" in remote debug HOT 1
- βI/O operation on closed fileβ when try with "Debugging from a separate terminal" HOT 10
- Error reported when exiting iPython and returning to UI on Mac OS X HOT 3
- Please make this marvel run well on a-Shell app for iPad HOT 1
- "Debugger instance already exists" when used in pytest HOT 5
- Greyscale Theme HOT 4
- New Release HOT 1
- Unable to use `--pdb --pdbcls=pudb.debugger:Debugger` with latest versions of urwid HOT 2
- telnetlib (used for remote debugger) is deprecated in Python 3.12 HOT 4
- Run to line in the same frame HOT 1
- Allow setting term size via env var HOT 1
- PUDB freezes at welcome screen HOT 2
- export PUDB_TTY=... not working
- how can i see or get the current debugged file path?
- Ipython StartUp Script for pudb python shell. HOT 3
- remote debugging with telnet fails: a Debugger instance already exists HOT 2
- Variable ListBox crashes for long variables repr HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pudb.