nose2 icon indicating copy to clipboard operation
nose2 copied to clipboard

make debugger plugin capable of using other (better) debuggers if configured

Open sanga opened this issue 11 years ago • 6 comments

Either ipdb or pudb are much nicer to use when debugging tests. It would be nice to have nose2 drop into either of those if they're available and nose2 is configured that way. So I guess I could either:

  • patch debugger.py to take a config option that would determine which debugger to drop into
  • create new plugins for other debuggers

Shall I just create a new plugin for (for eg) pudb and keep it locally, or would you rather a PR to make nose2's debugger capable of using debuggers other than pdb?

note: at least ipdb and pudb share the same interface as pdb, so the patch to make debugger generic is about 5 lines or so

sanga avatar Apr 04 '13 07:04 sanga

I'd definitely take a patch, especially one with tests (probably one new test in nose2/tests/unit/test_debugger_plugin.py would cover it) and documentation.

jpellerin avatar Apr 04 '13 13:04 jpellerin

ok. I have the patch working, but not the tests or docs. So PR coming at some point

sanga avatar Apr 04 '13 13:04 sanga

Do you have any objection if I make the tests depend on the mock library? Seems easier to do it that way

sanga avatar Apr 15 '13 19:04 sanga

No objection, as long as setup.py and requirements are updated to reflect that for python versions that don't include it.

On Mon, Apr 15, 2013 at 3:50 PM, Tim Sampson [email protected]:

Do you have any objection if I make the tests depend on the mock library? Seems easier to do it that way

— Reply to this email directly or view it on GitHubhttps://github.com/nose-devs/nose2/issues/69#issuecomment-16407341 .

jpellerin avatar Apr 15 '13 20:04 jpellerin

@sanga Care to share this so I can pick it off where you left if you don't have the time to complete it?

thedrow avatar Jul 18 '13 20:07 thedrow

sure. I've been using this locally for I while and it's been useful for me. There are two reasons I haven't published it:

a) I haven't written tests for it b) I've been debating with myself with the option should be an environment variable or a config option

I made it a conf option but it feels to me that it should be an env var (as our conf options live in git and every develop probably has a different favourite debugger). And plus config options seem to be the preferred way of doing things in nose2. Any options on that?

But yeah, I'll publish that WIP code. You can pick it up if you like.

sanga avatar Jul 19 '13 06:07 sanga