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!! |
||
|---|---|---|
| .github | ||
| debugger_protocol | ||
| ptvsd | ||
| tests | ||
| win | ||
| .flake8 | ||
| .flake8.ci | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| DESCRIPTION.md | ||
| LICENSE | ||
| Makefile | ||
| MANIFEST.in | ||
| README.md | ||
| setup.cfg | ||
| setup.py | ||
| versioneer.py | ||
Python Tools for Visual Studio debug server
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Custom Protocol arguments
1. Launch request arguments
{
"debugOptions": [
"RedirectOutput", // Whether to redirect stdout and stderr (see pydevd_comm.CMD_REDIRECT_OUTPUT)
"WaitOnNormalExit", // See WAIT_ON_NORMAL_EXIT in wrapper.py
"WaitOnAbnormalExit", // See WAIT_ON_ABNORMAL_EXIT in wrapper.py
"Django", // Enables Django Template debugging
"Jinja", // Enables Jinja (Flask) Template debugging
"FixFilePathCase", // See FIX_FILE_PATH_CASE in wrapper.py
"DebugStdLib" // Whether to enable debugging of standard library functions
]
}
2. Attach request arguments
{
"debugOptions": [
"RedirectOutput", // Whether to redirect stdout and stderr (see pydevd_comm.CMD_REDIRECT_OUTPUT)
"WaitOnNormalExit", // See WAIT_ON_NORMAL_EXIT in wrapper.py
"WaitOnAbnormalExit", // See WAIT_ON_ABNORMAL_EXIT in wrapper.py
"Django", // Enables Django Template debugging
"Jinja", // Enables Jinja (Flask) Template debugging
"FixFilePathCase", // See FIX_FILE_PATH_CASE in wrapper.py
"DebugStdLib" // Whether to enable debugging of standard library functions
"WindowsClient" // Whether client OS is Windows
"UnixClient" // Whether client OS is Unix
],
"pathMappings": [
{
"localRoot": "C:\\Project\\src", // Local root (where source and debugger running)
"remoteRoot": "/home/smith/proj" // Remote root (where remote code is running)
},
// Add more path mappings
]
}