{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/ptvsd/issues/752","repository_url":"https://api.github.com/repos/Microsoft/ptvsd","labels_url":"https://api.github.com/repos/Microsoft/ptvsd/issues/752/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ptvsd/issues/752/comments","events_url":"https://api.github.com/repos/Microsoft/ptvsd/issues/752/events","html_url":"https://github.com/Microsoft/ptvsd/issues/752","id":350622179,"node_id":"MDU6SXNzdWUzNTA2MjIxNzk=","number":752,"title":"Incorrect frame for breakpoint","user":{"login":"huguesv","id":1696845,"node_id":"MDQ6VXNlcjE2OTY4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1696845?v=4","gravatar_id":"","url":"https://api.github.com/users/huguesv","html_url":"https://github.com/huguesv","followers_url":"https://api.github.com/users/huguesv/followers","following_url":"https://api.github.com/users/huguesv/following{/other_user}","gists_url":"https://api.github.com/users/huguesv/gists{/gist_id}","starred_url":"https://api.github.com/users/huguesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huguesv/subscriptions","organizations_url":"https://api.github.com/users/huguesv/orgs","repos_url":"https://api.github.com/users/huguesv/repos","events_url":"https://api.github.com/users/huguesv/events{/privacy}","received_events_url":"https://api.github.com/users/huguesv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-14T22:37:42Z","updated_at":"2018-08-15T17:32:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Environment data\r\n\r\n- PTVSD version: today's master\r\n- OS and version: Win10\r\n- Python version (& distribution if applicable, e.g. Anaconda): 3.6\r\n- Using VS Code or Visual Studio: Visual Studio\r\n\r\n## Steps to reproduce:\r\n1. Type this code and set breakpoint on line 9 as in the picture and start debugging.\r\n```\r\nimport threading\r\nfrom queue import Queue\r\nimport time\r\n\r\nprint_lock = threading.Lock()\r\n\r\ndef get_url(current_url):\r\n\r\n    time.sleep(2)\r\n    with print_lock:\r\n        print(\"\\nStarting thread {}\".format(threading.current_thread().name))\r\n\r\ndef process_queue():\r\n    while True:\r\n        current_url = url_queue.get()\r\n        get_url(current_url)\r\n        url_queue.task_done()\r\n\r\nurl_queue = Queue()\r\n\r\nurl_list = [\"https://www.google.com\"]*5\r\n\r\nfor i in range(5):\r\n    t = threading.Thread(target=process_queue)\r\n    t.daemon = True\r\n    t.start()\r\n\r\nstart = time.time()\r\n\r\nfor current_url in url_list:\r\n    url_queue.put(current_url)\r\n\r\nurl_queue.join()\r\n\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/1696845/44122248-dba913c4-9fd7-11e8-9b16-2c36f9a3dfcc.png)\r\n\r\n## Actual behavior\r\n\r\nVS breaks on line 16.\r\n\r\n## Expected  behavior\r\n\r\nVS breaks on line 9.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/ptvsd/issues/comments/413273772","html_url":"https://github.com/Microsoft/ptvsd/issues/752#issuecomment-413273772","issue_url":"https://api.github.com/repos/Microsoft/ptvsd/issues/752","id":413273772,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzI3Mzc3Mg==","user":{"login":"karthiknadig","id":3840081,"node_id":"MDQ6VXNlcjM4NDAwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3840081?v=4","gravatar_id":"","url":"https://api.github.com/users/karthiknadig","html_url":"https://github.com/karthiknadig","followers_url":"https://api.github.com/users/karthiknadig/followers","following_url":"https://api.github.com/users/karthiknadig/following{/other_user}","gists_url":"https://api.github.com/users/karthiknadig/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiknadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiknadig/subscriptions","organizations_url":"https://api.github.com/users/karthiknadig/orgs","repos_url":"https://api.github.com/users/karthiknadig/repos","events_url":"https://api.github.com/users/karthiknadig/events{/privacy}","received_events_url":"https://api.github.com/users/karthiknadig/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T17:32:59Z","updated_at":"2018-08-15T17:32:59Z","author_association":"MEMBER","body":"This looks like it is paused on the wrong thread. VS UI shows the last paused thread instead of the thread that hit break point. We could probably use `preserveFocusHint` to control that."}}
{"actor":{"display_login":"karthiknadig"}}