classification
Title: Add option to pause regrtest to attach a debugger
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: brian.curtin, georg.brandl, python-dev
Priority: normal Keywords: patch

Created on 2011-04-12 03:23 by brian.curtin, last changed 2011-04-28 22:46 by brian.curtin. This issue is now closed.

Files
File name Uploaded Description Edit
attach.diff brian.curtin, 2011-04-12 03:23 review
Messages (4)
msg133559 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-04-12 03:23
Patch to add -a/--attach option to Lib/test/regrtest.py to pause before beginning test runs. This would allow a user to attach Visual Studio or some other debugger. Very simply, this option just blocks waiting for a keystroke during argument parsing - once you're ready, hit any key.

My use case is with Visual Studio, where I've wanted to debug C code used by tests and would prefer to attach to an external command prompt, rather than have to initiate the test from within VS.
msg133569 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-04-12 06:28
I can't judge if the functionality is needed, but I don't think the option should be called "attach" if all it does is input() somewhere...
msg133580 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-04-12 13:12
True. In the end all it does is wait for input not specific to attaching debuggers. How about ``--wait``?


I'm used to this functionality being `-x` in another app, so we're iteratively getting better :)
msg134726 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-28 22:45
New changeset 3d9800fcce7f by Brian Curtin in branch 'default':
Implement #11832. Add an option to start regrtest and wait for input
http://hg.python.org/cpython/rev/3d9800fcce7f
History
Date User Action Args
2011-04-28 22:46:43brian.curtinsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2011-04-28 22:45:27python-devsetnosy: + python-dev
messages: + msg134726
2011-04-12 13:12:29brian.curtinsetmessages: + msg133580
2011-04-12 06:28:08georg.brandlsetnosy: + georg.brandl
messages: + msg133569
2011-04-12 03:23:48brian.curtincreate