You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix debugger stepping actions in forked process (#1921)
* Fix debugger stepping actions in forked process
Fix the debugger stepping state when debugging a process that has been
forked from the main process. The new sys.monitoring mechanism didn't
fully clear the thread local storage after a fork leading to a state
where the forked child process tracked the wrong thread information and
was never updated on the latest continue action.
* Add stepping test for forked process
* Add line ending back in for cleaner diff
* More formatting reversions
- set FORCE_PYDEVD_VC_VARS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat
121
121
- in the pydevd folder: python .\build_tools\build.py
122
122
123
123
## Pushing pydevd back to PyDev.Debugger
124
124
125
-
If you've made changes to pydevd (at src/debugpy/_vendored/pydevd), you'll want to push back changes to pydevd so as Fabio makes changes to pydevd we can continue to share updates.
125
+
If you've made changes to pydevd (at src/debugpy/_vendored/pydevd), you'll want to push back changes to pydevd so as Fabio makes changes to pydevd we can continue to share updates.
126
126
127
127
To do this, you would:
128
128
@@ -148,13 +148,13 @@ You run all of the tests with (from the root folder):
148
148
149
149
- python -m pytest -n auto -rfE
150
150
151
-
That will run all of the tests in parallel and output any failures.
151
+
That will run all of the tests in parallel and output any failures.
152
152
153
153
If you want to just see failures you can do this:
154
154
155
155
- python -m pytest -n auto -q
156
156
157
-
That should generate output that just lists the tests which failed.
157
+
That should generate output that just lists the tests which failed.
158
158
159
159
```
160
160
=============================================== short test summary info ===============================================
@@ -167,7 +167,7 @@ With that you can then run individual tests like so:
167
167
168
168
- python -m pytest -n auto tests_python/test_debugger.py::test_path_translation[False]
169
169
170
-
That will generate a log from the test run.
170
+
That will generate a log from the test run.
171
171
172
172
Logging the test output can be tricky so here's some information on how to debug the tests.
173
173
@@ -194,7 +194,7 @@ Make sure if you add this in a module that gets `cythonized`, that you turn off
194
194
195
195
#### How to use logs to debug failures
196
196
197
-
Investigating log failures can be done in multiple ways.
197
+
Investigating log failures can be done in multiple ways.
198
198
199
199
If you have an existing test failing, you can investigate it by running the test with the main branch and comparing the results. To do so you would:
In order to investigate a failure you'd look for the CMDs you expect and then see where the CMDs deviate. At that point you'd add logging around what might have happened next.
241
+
In order to investigate a failure you'd look for the CMDs you expect and then see where the CMDs deviate. At that point you'd add logging around what might have happened next.
242
242
243
243
## Using modified debugpy in Visual Studio Code
244
244
To test integration between debugpy and Visual Studio Code, the latter can be directed to use a custom version of debugpy in lieu of the one bundled with the Python extension. This is done by specifying `"debugAdapterPath"` in `launch.json` - it must point at the root directory of the *package*, which is `src/debugpy` inside the repository:
0 commit comments