The Node.js debugger hides most of my string variables, it prints ... instead, like so: (there's a variable named source)
$ node debug 127.0.0.1:9101
debug>
debug> exec('source')
'<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="DW dw-pri js no... (length: 6408)'
debug>
debug> repl
Press Ctrl + C to leave debug repl
> source
'<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="DW dw-pri js no... (length: 6408)'
As you can see, it replaces most of the string, with .... I've googled for a while and typed help in the console. Finally posting here — how do I view the full contents of the string? console.log(source) didn't do anything.
Edit: Now I noticed that console.log does print the variable, in Selenium's terminal window, which perhaps is what I ought to have expected. Not sure if console.log and switching to the Selenium terminal window, is what I'm supposed to do
Update:
Typing just source doesn't work, outside repl:
debug> source
ReferenceError: source is not defined
at repl:1:1
at ContextifyScript.Script.runInContext (vm.js:32:29)
at Object.runInContext (vm.js:87:6)
at Interface.controlEval (_debugger.js:971:21)
at REPLServer.eval (_debugger.js:745:41)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:536:10)
at emitOne (events.js:96:13)
at REPLServer.emit (events.js:191:7)
(and when inside repl, the variable gets truncated, as shown in the topmost snippet above.)
And print(source) or print('source'):
debug> print('source')
ReferenceError: print is not defined
at repl:1:1
at ContextifyScript.Script.runInContext (vm.js:32:29)
at Object.runInContext (vm.js:87:6)
at Interface.controlEval (_debugger.js:971:21)
at REPLServer.eval (_debugger.js:745:41)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:536:10)
at emitOne (events.js:96:13)
at REPLServer.emit (events.js:191:7)
debug> repl
Press Ctrl + C to leave debug repl
> print(source)
ReferenceError: print is not defined
There aren't many commands to choose among: (in the debugger)
debug> help
Commands: run (r), cont (c), next (n), step (s),
out (o), backtrace (bt), setBreakpoint (sb), clearBreakpoint (cb),
watch, unwatch, watchers, repl, exec, restart, kill, list, scripts,
breakOnException, breakpoints, version
console.log()in the debug command line ?printinstead ofexec?source. Then the debugger won't findsource, because thesourcevariable is available only in the Node.js debuggee process, but not in the debugger itself.print— there's no such function available (not in the debugger, and not inside the repl)