Title: Prevent crash during debugging when attempting to inspect PyObject by lostmsu · Pull Request #1483 · pythonnet/pythonnet · GitHub
Open Graph Title: Prevent crash during debugging when attempting to inspect PyObject by lostmsu · Pull Request #1483 · pythonnet/pythonnet
X Title: Prevent crash during debugging when attempting to inspect PyObject by lostmsu · Pull Request #1483 · pythonnet/pythonnet
Description: What does this implement/fix? Explain your changes. When debugging code, that uses PyObject instances, debugger would try to execute PyObject.ToString to show PyObject values in watches window. That call causes AccessViolationException when the current thread does not hold global interpreter lock. This change adds DebuggerDisplay attribute to PyObject, that makes debugger first check if GIL is held by the current thread, and only use ToString when it does. Otherwise, a message with object handle and a suggestion to acquire GIL is displayed.
Open Graph Description: What does this implement/fix? Explain your changes. When debugging code, that uses PyObject instances, debugger would try to execute PyObject.ToString to show PyObject values in watches window. Tha...
X Description: What does this implement/fix? Explain your changes. When debugging code, that uses PyObject instances, debugger would try to execute PyObject.ToString to show PyObject values in watches window. Tha...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1483
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:04bf1eaa-c004-2f29-944e-58bc2c764765 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E68E:2A625F:438B644:5E3FC29:69714676 |
| html-safe-nonce | 1614fd36488f7553cfdc6cc57f7146cdbdccb969d14411ba12f438d0b3dfef58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjhFOjJBNjI1Rjo0MzhCNjQ0OjVFM0ZDMjk6Njk3MTQ2NzYiLCJ2aXNpdG9yX2lkIjoiNjgzNjU3Mjc3NDIzNTk4MTQzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f81a6b8f36766809743a3c774da6aa5c65302597fc23226ddb61ee52a4e04b17 |
| hovercard-subject-tag | pull_request:684762111 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/pythonnet/pythonnet/pull/1483/files |
| twitter:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| og:image:alt | What does this implement/fix? Explain your changes. When debugging code, that uses PyObject instances, debugger would try to execute PyObject.ToString to show PyObject values in watches window. Tha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9bd14a55b65b030988a89787ed340c0f040258c3240af6941d85f740f21629a0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 24a7109a3a584a05e29240fcc1ba60220deccdb8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width