For example, this problem: 116. Populating Next Right Pointers in Each Node.
Since it is not testable, so I have to directly submit it, and need stdout for debugging.
When I submit it directly from leetcode.com, I could see a Stdout section on the bottom of that page.
While when I submit from command line: leetcode submit....
I could not see stdout..
I debug into your code, in submit.js
core.submitProblem(problem, function(e, results) {
if (e) return log.fail(e);
for (let i = 0; i < results.length; ++i) {
let result = results[i];
for (var key in result) {
if (result.hasOwnProperty(key)) {
console.log(key + " -> " + result[key]);
}
}
}
I only see following output, on stdout
ok -> false
answer -> undefined
runtime -> N/A
state -> Runtime Error
testcase -> '{1,2,3}'
passed -> 0
total -> 0
error -> Exception in thread "main" java.lang.NullPointerException
at Solution.connect(Solution.java:20)
at Driver.main(Driver.java:23)
expected_answer -> undefined
type -> Actual
id -> 159485415
Then why submit directly from leetcode.com could see the stdout section. Are you using the same api ?
I am trying to find the rest post details when submitting code,
In Chrome, I use right click-> inspect -> console, while I see nothing.
For example, this problem: 116. Populating Next Right Pointers in Each Node. Since it is not testable, so I have to directly submit it, and need stdout for debugging.
When I submit it directly from leetcode.com, I could see a Stdout section on the bottom of that page. While when I submit from command line: leetcode submit.... I could not see stdout.. I debug into your code, in submit.js
I only see following output, on stdout
ok -> false answer -> undefined runtime -> N/A state -> Runtime Error testcase -> '{1,2,3}' passed -> 0 total -> 0 error -> Exception in thread "main" java.lang.NullPointerException at Solution.connect(Solution.java:20) at Driver.main(Driver.java:23) expected_answer -> undefined type -> Actual id -> 159485415
Then why submit directly from leetcode.com could see the stdout section. Are you using the same api ? I am trying to find the rest post details when submitting code, In Chrome, I use right click-> inspect -> console, while I see nothing.