{"action":"opened","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/1073","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1073/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1073/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/1073/events","html_url":"https://github.com/spyder-ide/spyder/issues/1073","id":57952495,"number":1073,"title":"Debugging: Unable to run selection while debugging","user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/2%E2%80%935%20stars","name":"2–5 stars","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/Debugger","name":"Debugger","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/imported","name":"imported","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spyder-ide/spyder/milestones/5","labels_url":"https://api.github.com/repos/spyder-ide/spyder/milestones/5/labels","id":982077,"number":5,"title":"v2.4","description":null,"creator":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":2,"state":"open","created_at":"2015-02-16T23:17:23Z","updated_at":"2015-02-17T17:14:08Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-02-17T17:14:08Z","updated_at":"2015-02-17T17:14:08Z","closed_at":null,"body":"_From [steve.f....@gmail.com](https://code.google.com/u/117650558843796505335/) on 2012-06-01T10:05:05Z_\n\nSpyder Version:  2.2.0dev (2164: rb467fe7f448d )\r\nPython Version:  2.7.2\r\nQt Version:      4.7.4, PyQt4 (API v1) 4.8.6 on Windows \n\nWhat steps will reproduce the problem?\n\n 1. Create a breakpoint in a file\r\n2. Start the debugger (Ctrl+F5)\r\n3. Press 'c' to run to the breakpoint\r\n4. Highlight a block of code.\r\n5. Press F9 to attempt to execute the block. What is the expected output? What do you see instead? pdb complains about the syntax of the lines being inserted.  It has it's own set of commands that are valid to execute.  A simple way to work around this is to combine the block into a single line to be executed but echo it to the console like normal.  Single lines of code can be executed correctly in pdb. \n\nPlease provide any additional information below\n\n. > d:\\devel\\spyder_pdb_code_injection_bug.py(4)<module>()\r\n-> \"\"\"\r\n(Pdb) c\r\nThis is a test of attempting to run a block of code while debugging in Spyder\r\n\\> d:\\devel\\spyder_pdb_code_injection_bug.py(9)<module>()\r\n-> print \"This line has a breakpoint\"\r\n(Pdb) food_map = {\r\n*** SyntaxError: unexpected EOF while parsing (<stdin>, line 1)\r\n(Pdb)     \"banana\": \"yellow\",\r\n*** SyntaxError: invalid syntax (<stdin>, line 1)\r\n(Pdb)     \"orange\": \"orange\",\r\n*** SyntaxError: invalid syntax (<stdin>, line 1)\r\n(Pdb)     \"apple\": \"red\",\r\n*** SyntaxError: invalid syntax (<stdin>, line 1)\r\n(Pdb) }\r\n*** SyntaxError: invalid syntax (<stdin>, line 1)\r\n(Pdb)\n\n**Attachment:** [spyder_pdb_code_injection_bug.py](http://code.google.com/p/spyderlib/issues/detail?id=1073)\n\n_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1073_"}}