My rusty code gets stuck somewhere inside rust-http, and I don't know how to debug it.
I get this error on startup:
$ ./target/ecmiwc -i www.google.com -u testuser -v test task '<main>' failed at 'called `Option::unwrap()` on a `None` value', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libcore/option.rs:262
I would like some instruction on how to find the code that calls Option::unwrap() .
How can I run the main file or is there any other way to get additional information?
My programming experience is mainly related to dynamic languages, where a crash gives you full backtracking, and it is quite easy to find the problematic code. How to get similar information with rust?
Next edit:
Based on a response from Steve K, I included backtrace env, but unfortunately backtrace is not very useful:
$ RUST_BACKTRACE=1 ./target/ecmiwc -i www.google.com -u testuser -v test task '<main>' failed at 'called `Option::unwrap()` on a `None` value', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libcore/option.rs:262 stack backtrace: 1: 0x10b70c065 - rt::backtrace::imp::write::h471bb232e1b48857jar 2: 0x10b70f1ef - failure::on_fail::h05edea1dadf8fbaaOqr 3: 0x10b715e25 - unwind::begin_unwind_inner::h7c6fecebc6991c8bS5d 4: 0x10b715a5b - unwind::begin_unwind_fmt::h227376fe1e021a36n3d 5: 0x10b7158b2 - rust_begin_unwind 6: 0x10b73769c - failure::begin_unwind::h7d8f396ab219c1bbn5j 7: 0x10b5a2cce - option::Option<T>::unwrap::h6219013626023885255 8: 0x10b5a25e8 - client::request::RequestWriter<S>::connect::h10689478801106876767 9: 0x10b59d523 - Ecm::login::h463674fdedafce079ja 10: 0x10b5ab502 - main::h2d8f53839ca9df9eDJa 11: 0x10b6fd879 - start::closure.8479 12: 0x10b716b3c - rust_try_inner 13: 0x10b716b26 - rust_try 14: 0x10b713e0b - unwind::try::h5982dbe8fdfe64a5nUd 15: 0x10b713beb - task::Task::run::h1c9de674e75b1485v2c 16: 0x10b6fd6af - start::h15d3cd64eea8fd88hve 17: 0x10b6fd4dc - lang_start::h7823875e69d425d0Bue 18: 0x10b5ab6df - main
Did I miss something?
thanks
source share