René's URL Explorer Experiment


Title: ipdb and "--simple-prompt" leads to an eventloop crash · Issue #10577 · ipython/ipython · GitHub

Open Graph Title: ipdb and "--simple-prompt" leads to an eventloop crash · Issue #10577 · ipython/ipython

X Title: ipdb and "--simple-prompt" leads to an eventloop crash · Issue #10577 · ipython/ipython

Description: Hi, It does not appear to be currently possible to use the IPython debugger in conjunction with the simple-prompt mode and ipdb (from pypi : pip install ipdb). This makes debugging multithreaded applications with ipdb and Emacs impossibl...

Open Graph Description: Hi, It does not appear to be currently possible to use the IPython debugger in conjunction with the simple-prompt mode and ipdb (from pypi : pip install ipdb). This makes debugging multithreaded ap...

X Description: Hi, It does not appear to be currently possible to use the IPython debugger in conjunction with the simple-prompt mode and ipdb (from pypi : pip install ipdb). This makes debugging multithreaded ap...

Opengraph URL: https://github.com/ipython/ipython/issues/10577

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ipdb and \"--simple-prompt\" leads to an eventloop crash","articleBody":"Hi,\r\n\r\nIt does not appear to be currently possible to use the IPython debugger in conjunction with the simple-prompt mode and ipdb (from pypi : `pip install ipdb`).\r\n\r\nThis makes debugging multithreaded applications with ipdb and Emacs impossible (since the only way to break in the right thread is to put the snippet: `import ipdb; ipdb.set_trace()` in the code.\r\n\r\nIf I remove the \"--simple-prompt\" option then I get garbled text such as \"^[[6n^[[Jipdb\u003e ^[[6D^[[6C\" at the ipdb prompt in Emacs since this is a dumb terminal which doesn't understand the special character escapes sent back by prompt_toolkit.\r\n\r\nThe traceback returned when using \"--simple-prompt\" is :\r\n````\r\n [...]\r\n  File \"some_file.py\", line 30, in some_function\r\n    import ipdb; ipdb.set_trace()\r\n  File \"/home/maxim/.virtualenvs/project1/local/lib/python2.7/site-packages/ipdb/__main__.py\", line 97, in set_trace\r\n    p = _init_pdb(context).set_trace(frame)\r\n  File \"/home/maxim/.virtualenvs/project1/local/lib/python2.7/site-packages/ipdb/__main__.py\", line 77, in _init_pdb\r\n    p = debugger_cls(def_colors, context=context)\r\n  File \"/home/maxim/.virtualenvs/project1/local/lib/python2.7/site-packages/IPython/terminal/debugger.py\", line 26, in __init__\r\n    self.pt_init()\r\n  File \"/home/maxim/.virtualenvs/project1/local/lib/python2.7/site-packages/IPython/terminal/debugger.py\", line 68, in pt_init\r\n    self.pt_cli = CommandLineInterface(self._pt_app, eventloop=self.shell._eventloop)\r\nAttributeError: 'TerminalInteractiveShell' object has no attribute '_eventloop'\r\n````\r\n\r\nIt should be trivial to reproduce. Make sure you have `ipdb` installed (`pip install ipdb`).\r\n\r\n1. Create a script such as the following to a file named \"ipdb_eventloop_repro.py\":\r\n\r\n````\r\nprint 'hello'\r\nprint ''\r\nimport ipdb; ipdb.set_trace()\r\nprint 'world'\r\n````\r\n2. In a terminal, start the IPython process in 'simple-prompt' mode like this:\r\n\r\n`ipython --simple-prompt -c \"%run -d ipdb_eventloop_repro.py\"`\r\n\r\n3. Then press 'c' to trigger the crash.\r\n\r\nI'm not sure where the fix should happen: in IPython, or in ipdb? There was an attempt at fixing it on the ipdb side here: https://github.com/gotcha/ipdb/pull/130 but it causes spewing to restart in the dumb shell since it relies on the prompt_toolkit eventloop.\r\n\r\nAny suggestion of a fix? I'd really like to get ipdb + Emacs going :)","author":{"url":"https://github.com/apteryks","@type":"Person","name":"apteryks"},"datePublished":"2017-05-19T22:00:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/10577/ipython/issues/10577"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:88240136-471b-96ec-319c-37fcf7120ddd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA66C:9609B:27FEDF6:398D385:6A4D236A
html-safe-nonce10fec19499b6e8194755dbb7940dff00a90f9962b2a90b3f75f9ed49fb10ff53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjZDOjk2MDlCOjI3RkVERjY6Mzk4RDM4NTo2QTREMjM2QSIsInZpc2l0b3JfaWQiOiIzMzk4MTY5MDcyNTg3NTgwMjY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacac46c02917dabc400127ead198bde41792aba2315fe49ff84901051811098a11
hovercard-subject-tagissue:230100291
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/10577/issue_layout
twitter:imagehttps://opengraph.githubassets.com/887ead78b7077c2b31024531b3a97a25d91ff871aa0b93985d5ac78560992725/ipython/ipython/issues/10577
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/887ead78b7077c2b31024531b3a97a25d91ff871aa0b93985d5ac78560992725/ipython/ipython/issues/10577
og:image:altHi, It does not appear to be currently possible to use the IPython debugger in conjunction with the simple-prompt mode and ipdb (from pypi : pip install ipdb). This makes debugging multithreaded ap...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameapteryks
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
go-importgithub.com/ipython/ipython git https://github.com/ipython/ipython.git
octolytics-dimension-user_id230453
octolytics-dimension-user_loginipython
octolytics-dimension-repository_id658518
octolytics-dimension-repository_nwoipython/ipython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id658518
octolytics-dimension-repository_network_root_nwoipython/ipython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release93f17a978ee60bc4668e1d7b90e6bd2d622261fd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ipython/ipython/issues/10577#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fipython%2Fipython%2Fissues%2F10577
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fipython%2Fipython%2Fissues%2F10577
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ipython%2Fipython
Reloadhttps://github.com/ipython/ipython/issues/10577
Reloadhttps://github.com/ipython/ipython/issues/10577
Reloadhttps://github.com/ipython/ipython/issues/10577
Please reload this pagehttps://github.com/ipython/ipython/issues/10577
ipython https://github.com/ipython
ipythonhttps://github.com/ipython/ipython
Please reload this pagehttps://github.com/ipython/ipython/issues/10577
Notifications https://github.com/login?return_to=%2Fipython%2Fipython
Fork 4.5k https://github.com/login?return_to=%2Fipython%2Fipython
Star 16.7k https://github.com/login?return_to=%2Fipython%2Fipython
Code https://github.com/ipython/ipython
Issues 1.3k https://github.com/ipython/ipython/issues
Pull requests 30 https://github.com/ipython/ipython/pulls
Actions https://github.com/ipython/ipython/actions
Projects https://github.com/ipython/ipython/projects
Wiki https://github.com/ipython/ipython/wiki
Security and quality 2 https://github.com/ipython/ipython/security
Insights https://github.com/ipython/ipython/pulse
Code https://github.com/ipython/ipython
Issues https://github.com/ipython/ipython/issues
Pull requests https://github.com/ipython/ipython/pulls
Actions https://github.com/ipython/ipython/actions
Projects https://github.com/ipython/ipython/projects
Wiki https://github.com/ipython/ipython/wiki
Security and quality https://github.com/ipython/ipython/security
Insights https://github.com/ipython/ipython/pulse
ipdb and "--simple-prompt" leads to an eventloop crashhttps://github.com/ipython/ipython/issues/10577#top
wishlisthttps://github.com/ipython/ipython/milestone/9
https://github.com/apteryks
apterykshttps://github.com/apteryks
on May 19, 2017https://github.com/ipython/ipython/issues/10577#issue-230100291
gotcha/ipdb#130https://github.com/gotcha/ipdb/pull/130
wishlistNo due datehttps://github.com/ipython/ipython/milestone/9
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.