{"action":"closed","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/3682","labels_url":"https://api.github.com/repos/nodejs/node/issues/3682/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/3682/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/3682/events","html_url":"https://github.com/nodejs/node/issues/3682","id":115389970,"number":3682,"title":"Debugging across http requests throws exception","user":{"login":"willm","id":771001,"avatar_url":"https://avatars.githubusercontent.com/u/771001?v=3","gravatar_id":"","url":"https://api.github.com/users/willm","html_url":"https://github.com/willm","followers_url":"https://api.github.com/users/willm/followers","following_url":"https://api.github.com/users/willm/following{/other_user}","gists_url":"https://api.github.com/users/willm/gists{/gist_id}","starred_url":"https://api.github.com/users/willm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willm/subscriptions","organizations_url":"https://api.github.com/users/willm/orgs","repos_url":"https://api.github.com/users/willm/repos","events_url":"https://api.github.com/users/willm/events{/privacy}","received_events_url":"https://api.github.com/users/willm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/debugger","name":"debugger","color":"bfd4f2"},{"url":"https://api.github.com/repos/nodejs/node/labels/tls","name":"tls","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T22:29:51Z","updated_at":"2015-11-06T13:06:07Z","closed_at":"2015-11-06T13:06:07Z","body":"Hi,\r\n\r\nI hope this is the right place to post this, but I think I've found an issue with `node debug`.\r\n\r\nGiven this code in `test.js`:\r\n\r\n```javascript\r\nvar http = require('https');\r\nhttp.get('https://nodejs.org', function (res) {\r\n    debugger;\r\n}).on('error', function (e) {\r\n    throw e;\r\n});\r\n```\r\n```\r\nnode debug test.js                                                                                                               20 ↵\r\n< Debugger listening on port 5858\r\ndebug> . ok\r\nbreak in test/t.js:1\r\n> 1 var http = require('https');\r\n  2     http.get('https://nodejs.org', function (res) {\r\n  3         debugger;\r\ndebug> c\r\nbreak in test/t.js:3\r\n  1 var http = require('https');\r\n  2     http.get('https://nodejs.org', function (res) {\r\n> 3         debugger;\r\n  4     }).on('error', function (e) {\r\ndebug> repl\r\nPress Ctrl + C to leave debug repl\r\n> res\r\n< iojs: ../src/util-inl.h:196: TypeName* node::Unwrap(v8::Local<v8::Object>) [with TypeName = node::TLSWrap]: Assertion `(object->InternalFieldCount()) > (0)' failed.\r\nprogram terminated\r\n```\r\n\r\nI think this should be allowing me to inspect the res object. Not sure if this is a node or V8 issue though. I'm running node 4.0.0 on Ubuntu 14.04.3 LTS\r\n\r\n```\r\nnode --version\r\nv4.0.0\r\n```"}}