var test = "foo";
var test2 = "bar";
io.sockets.on("connection", function (socket) {
var t = test;
debugger;
});
I am running the above code in node with "node debug app.js". I hit my breakpoint and entered the cue. I expected that I could access the variables in the inner and outer scope, however, I get a ReferenceError when I try to display the content test2, since repl does not consider it to be defined. testonly works because I explicitly refer to it in the inner area when I appoint t.
Is there a way to start the node debugger so that I can access these external scope variables?
gusto source
share