* sys.__breakpointhook__ should be available when __builtin__.breakpoint is set. Fixes#766
* On Python 3.7, sys.__breakpointhook__ should not be tested as it'll call the original pdb version.
* Try setting timeouts to stabalize tests
* Fix linter issues
* Fix break into debugger
* Soem tweaks
* Give web server additional time to finish writing to output
* refactor server url extraction code
* Fix 253 builtin breakpoint (#756)
* Refactored pydevd tests.
* Add support for Python 3.7 breakpoint() function. #253
* Add tests for continue on disconnect. (#744)
* Add tests for continue on disconnect.
* Wait for optput before sending commands
* Try setting timeouts to stabalize tests
* Fix linter issues
* Fix break into debugger
* Soem tweaks
* Give web server additional time to finish writing to output
* Address comments and enable more tests
* Set timeout in disconnect test
* Fix linter
* Ensure stopped thread is breakpoint thread
* Fix server attach break into debugger issue
* More fixes and tweaks
* Added launch module test for break_into_debugger
* Tweak allowing break_into_debugger
* Add more tests
* Switch to using CMD_GET_EXCEPTION_DETAILS (#738)
* Switch to using CMD_GET_EXCEPTION_DETAILS
* Fix exception tests
* Fix breakpoint tests
* Fix ThreadSuspendEventTests
* Fix ExceptionInfoTests
* Fix linter issue
* Some tweaks
* Fix server attach break into debugger issue
* More fixes and tweaks
* Added launch module test for break_into_debugger
* Fix linter issues
* Add file path to sys.argv when running as module
* Bunch of fixes to set the argv[0] correctly.
* check for pyc
* tweak __main__ py or pyc selection for argv
* Continue resumes all threads
* Enable suspend policy ALL
* stacktraces and active exceptions are no longer stored
* stacktraces and active exceptions are no longer stored
* Fix set breakpoints tests
* Fix exception info
* Fix breakpoint tests
* Fix exception breakpoint tests
* Fix syntax
* Fix exception info
* Fix syntax
* Fix Stack trace tests
* Fix for 2.7
* Minor refactor
* Fix ContinueTests
* Fix ExceptionInfoTests
* Enable more tests
* Remove tests that are now no-ops
* Minor tweaks
* Fix test_attach_breakpoints
* typo
* More tweaks
* Send error response for unknown threads
* Use assert_contains in continue tests
* Add some TODOs
* Continue if the suspended in debugger code
* Get more info via exception description
* More logging
* Add a check for site-packages
* Remove debug logs and cleanup
* Fix tests
* Fix more test bugs
* more cleanup
Fixes#545, #711, #712
More tests to be written as part of #718
Summary of solution:
* For remote attach, spin up pydevd (use `install`)
* In a separate thread wait for connections (within a loop, to support multiples)
* Ensure only one connection is supported at a time
* Use a simple event to ensure we have a single session at a time (we won't accept more than one connection if even is set)
* Use a simple event to detect when a handshake has been successfully been done

@karthiknadig
I've basically reverted the way `enable_attach` works.
This allows breaking into the current thread without any issues.
Not sure what else it breaks, lets see how the tests go.
Lets talk about the changes, hacks/solutions tomorrow.
Easy fixes, just need some simple locks!!
Fixes#675#674
* Flask system tests initial
* Enable route and template breakpoint tests.
* Fix typo
* Remove wait for thread exit
* Few more tweaks
* More tweaks
* Try adding LC_ALL utf-8
* Add more tests
* Remove flask version pinning
* Rename and move flask tests to make room for django tests
* Switch to using requests
* Fix line number in attach
* Add django to packages
* Add Django tests
* Tweaks to django test
* Remove hardcoded port
Adds unhandled exception tests #654
Fixes a bug in _io.py that caused JSONDecodeError in tests sometimes #683
Fixes a issue for some cases where the tests were timing out on windows
(helps #545)
This reverts commit 80d86b9.
Note that this still suffers from the caveat that if attach doesn't happen within a second (and wait_for_attach() isn't called) then the main thread will never have debugging enabled. One way or another that will need to be addressed.
(helps #545)
We move the settrace() into a thread, but make sure to wait for the thread to finish in wait_for_attach().
My only concern with the solution is that the current thread will not get debugged if enable_attach() is called but wait_for_attach() is not (and no attach happens right away). I'm going to address this in a follow-up PR by monkey-patching sys.settrace temporarily.
Fixes#631
* PTVSD takes a while to load, hence having a timeout of 1.0 is not sufficient.
* Increased time to 5.0 as that'll give it plenty of time to load.
* why 5s instead of 2s, simple, why not 5s instead of 2s.
* Add timeouts for thread.joins (this is the main change)
* Format errors captured and displayed (for py27 and 3 compatibility)
* Format code (this accounts for 95% of the changes, was tired of linter errors, hence formatted code using autpep8)