FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

No Stdout in leetcode cli submit response · Issue #110 · skygragon/leetcode-cli · GitHub

No Stdout in leetcode cli submit response #110

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL