Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1551: Backchannel failures in tests #1557

Merged
merged 1 commit into from Jul 3, 2019

Conversation

Projects
None yet
2 participants
@int19h
Copy link
Contributor

commented Jul 2, 2019

Fix various bugs around handling of disconnect in JsonIOStream and JsonMessageChannel.

Fix handling of DAP "terminated" event in debug.Session.

Add --ptvsd-logs and --pydevd-logs switches to pytest.

Improve message logging to fully capture the raw message data in the logs if deserialization fails.

Log all debuggee environment variables in debug.Session, and improve log readability.

@int19h int19h requested a review from karthiknadig Jul 2, 2019


tox -e py37 -- --ptvsd-logs "tests/ptvsd/server/test_run.py::test_run[launch-file]"

A separate ptvsd-{pid}.log file will be created for every ptvsd process spawned by

This comment has been minimized.

Copy link
@karthiknadig

karthiknadig Jul 2, 2019

Member

Should we add a timestamp to the name?

This comment has been minimized.

Copy link
@int19h

int19h Jul 2, 2019

Author Contributor

It would prevent them being overwritten, but make it hard to correlate ptvsd logs with pydevd logs.

I could add the process ID of the test worker, though, and also add it to the test worker log. That way you could at least find which pydevd log corresponds to which failed test.

This comment has been minimized.

Copy link
@int19h

int19h Jul 2, 2019

Author Contributor

Ah no, that doesn't really work... because the same worker will run multiple tests.

However, there's already existing logic that generates pydevd logs separately for every debug.Session in a temp directory - that's used to dump them if the test fails or times out. I can uncomment the line that logs the name of that temp file - then you can see it in test logs even for successful tests, and inspect it there.

For this switch, let's keep it as is. It's mainly for debugging a specific test, anyway. And once we have end-to-end logs, the problem goes away.

This comment has been minimized.

Copy link
@karthiknadig

karthiknadig Jul 2, 2019

Member

For clarity, I was thinking ptvsd-{pid}-{timestamp}.log. We can do that change if it really becomes a issue.

@int19h int19h force-pushed the int19h:tests branch 2 times, most recently from 409f981 to d6b6980 Jul 2, 2019

Fix #1551: Backchannel failures in tests
Fix various bugs around handling of disconnect in JsonIOStream and JsonMessageChannel.

Fix handling of DAP "terminated" event in debug.Session.

Add --ptvsd-logs and --pydevd-logs switches to pytest.

Improve message logging to fully capture the raw message data in the logs if deserialization fails.

Log all debuggee environment variables in debug.Session, and improve log readability.

@int19h int19h force-pushed the int19h:tests branch from d6b6980 to c5370bd Jul 2, 2019

@int19h int19h merged commit 82b62b7 into microsoft:dbg_adapter_refactor Jul 3, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.