Title: expose globals in bpdb debugging · Issue #713 · bpython/bpython · GitHub
Open Graph Title: expose globals in bpdb debugging · Issue #713 · bpython/bpython
X Title: expose globals in bpdb debugging · Issue #713 · bpython/bpython
Description: I love bpython! I haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpython debugger - to interact with the globals...
Open Graph Description: I love bpython! I haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpython...
X Description: I love bpython! I haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpy...
Opengraph URL: https://github.com/bpython/bpython/issues/713
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"expose globals in bpdb debugging","articleBody":"I love bpython!\r\n\r\nI haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpython debugger - to interact with the globals (for instance, debugging functions I might have defined in the same module as the function the pm debugging is in), I have to drop out of bpdb, losing all of it's benefits.\r\n\r\n```python\r\ndef debug():\r\n print('global debugging!')\r\n\r\ndef broken():\r\n def internal_debug():\r\n print('local debugging!')\r\n do_bad_thing_here() # pm debugging drops me here\r\n```\r\n\r\nin the above example, I can do `\u003e\u003e\u003e intern\u003ctab\u003e`, and get `internal_debug` to complete and get its help, and run it, but if I try to do `\u003e\u003e\u003e debug()\u003center\u003e` I get an error about the name \"debug\" not being defined.\r\n\r\nI can do `\u003e\u003e\u003e exit()` to get back to `(BPdb) ` and then do `(BPdb) debug()\u003center\u003e` and `debug` is available and executes correctly.\r\n\r\nI've found code that looks like it's only exposing the locals (https://github.com/bpython/bpython/blob/2349722c9ce9b6f9d7ad5f411a1b5d2859a6b116/bpdb/debugger.py#L47), but I'm not sure how easy it is to make it expose the globals, too. \r\n\r\nI'll circle back and investigate more, but on the chance someone else knows better or gets to a PR first, I figured I'd post this issue.","author":{"url":"https://github.com/toejough","@type":"Person","name":"toejough"},"datePublished":"2017-11-01T14:48:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/713/bpython/issues/713"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a5652825-a051-eb5d-38fd-b6eef8dc173b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80F0:367397:3AE89A:53792D:696A09E2 |
| html-safe-nonce | b5c5d008f3a0a5308b5955ad75b5092f755058c2a44b60148631052f5a08c0ae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEYwOjM2NzM5NzozQUU4OUE6NTM3OTJEOjY5NkEwOUUyIiwidmlzaXRvcl9pZCI6IjcyMTM0NzI1MDExMDUwMzU3NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 33f897feac4e1a67e58f6595e2763435bdbb9cf7fbcac24901f8bcc9eea4b57d |
| hovercard-subject-tag | issue:270332936 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/bpython/bpython/713/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5a963630f75f8a392edf7b13ff2bb1464bef9c43c124ea0faa930c71275ac4fe/bpython/bpython/issues/713 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5a963630f75f8a392edf7b13ff2bb1464bef9c43c124ea0faa930c71275ac4fe/bpython/bpython/issues/713 |
| og:image:alt | I love bpython! I haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpython... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | toejough |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width