Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make --inspect-brk pause on the first line of _user_ code #5250

Merged
merged 1 commit into from
May 12, 2020

Conversation

piscisaureus
Copy link
Member

No description provided.

cli/inspector.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member

FYI I hit a panic as soon as I connected the devtools (debug build)

./target/debug/deno run --inspect-brk -A https://deno.land/[email protected]/http/file_server.ts
Debugger listening on ws:https://127.0.0.1:9229/ws/704f3fea-6927-4701-957c-f47c7c51d35e
true "https://deno.land/[email protected]/http/file_server.ts"
Debugger session started.


#
# Fatal error in ../../../../v8/src/api/api-inl.h, line 51
# Debug check failed: obj.is_null() || (obj->IsSmi() || !obj->IsTheHole()).
#
#
#
#FailureMessage Object: 0x7ffee9bc2ca0
==== C stack trace ===============================

    0   deno                                0x0000000108403bf3 v8::base::debug::StackTrace::StackTrace() + 19
    1   deno                                0x0000000108e9791b v8::platform::(anonymous namespace)::PrintStackTrace() + 59
    2   deno                                0x00000001083f9871 V8_Fatal(char const*, int, char const*, ...) + 337
    3   deno                                0x00000001083f8fd5 v8::base::(anonymous namespace)::DefaultDcheckHandler(char const*, int, char const*) + 21
    4   deno                                0x0000000107e7608f v8::Utils::ToLocal(v8::internal::Handle<v8::internal::Object>) + 319
    5   deno                                0x0000000107a261bd v8::internal::DebugStackTraceIterator::Evaluate(v8::Local<v8::String>, bool) + 509
    6   deno                                0x000000010846c8d3 v8_inspector::V8DebuggerAgentImpl::evaluateOnCallFrame(v8_inspector::String16 const&, v8_inspector::String16 const&, v8_crdtp::glue::detail::ValueMaybe<v8_inspector::String16>, v8_crdtp::glue::detail::ValueMaybe<bool>, v8_crdtp::glue::detail::ValueMaybe<bool>, v8_crdtp::glue::detail::ValueMaybe<bool>, v8_crdtp::glue::detail::ValueMaybe<bool>, v8_crdtp::glue::detail::ValueMaybe<bool>, v8_crdtp::glue::detail::ValueMaybe<double>, std::__1::unique_ptr<v8_inspector::protocol::Runtime::RemoteObject, std::__1::default_delete<v8_inspector::protocol::Runtime::RemoteObject> >*, v8_crdtp::glue::detail::PtrMaybe<v8_inspector::protocol::Runtime::ExceptionDetails>*) + 1267
    7   deno                                0x0000000108411a75 v8_inspector::protocol::Debugger::DomainDispatcherImpl::evaluateOnCallFrame(v8_crdtp::Dispatchable const&, v8_inspector::protocol::DictionaryValue*, v8_crdtp::ErrorSupport*) + 2149
    8   deno                                0x00000001084196f6 _ZNSt3__110__function16__policy_invokerIFvRKN8v8_crdtp12DispatchableEEE11__call_implINS0_20__default_alloc_funcIZN12v8_inspector8protocol8Debugger20DomainDispatcherImpl8DispatchENS2_4spanIhEEE3$_0S6_EEEEvPKNS0_16__policy_storageES5_ + 150
    9   deno                                0x00000001084c6923 v8_crdtp::UberDispatcher::DispatchResult::Run() + 35
    10  deno                                0x000000010848dba4 v8_inspector::V8InspectorSessionImpl::dispatchProtocolMessage(v8_inspector::StringView) + 356
    11  deno                                0x0000000107874d05 rusty_v8::inspector::V8InspectorSession::dispatch_protocol_message::h54ddb87c4e24b1d0 + 69
    12  deno                                0x000000010653b767 _ZN4deno9inspector20DenoInspectorSession22receive_from_websocket28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h5f5d12ae120a5433E + 151
    13  deno                                0x000000010673f9b2 _ZN110_$LT$futures_util..stream..try_stream..map_ok..MapOk$LT$St$C$F$GT$$u20$as$u20$futures_core..stream..Stream$GT$9poll_next28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h17f6585b62c5cfffE + 242
    14  deno                                0x0000000106193d43 _ZN4core6result19Result$LT$T$C$E$GT$3map17hd79efb499c554270E + 307
    15  deno                                0x000000010673f89d _ZN110_$LT$futures_util..stream..try_stream..map_ok..MapOk$LT$St$C$F$GT$$u20$as$u20$futures_core..stream..Stream$GT$9poll_next28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17h54ce373741ab09f0E + 61
    16  deno                                0x00000001062755b8 _ZN4core6option15Option$LT$T$GT$3map17hf361c76736125bccE + 344
    17  deno                                0x000000010673f84f _ZN110_$LT$futures_util..stream..try_stream..map_ok..MapOk$LT$St$C$F$GT$$u20$as$u20$futures_core..stream..Stream$GT$9poll_next28_$u7b$$u7b$closure$u7d$$u7d$17h4e7f633f70c90b54E + 79
    18  deno                                0x000000010684501d _ZN4core4task4poll13Poll$LT$T$GT$3map17he2a0c92e1cc528b8E + 349
    19  deno                                0x000000010673f7e5 _ZN110_$LT$futures_util..stream..try_stream..map_ok..MapOk$LT$St$C$F$GT$$u20$as$u20$futures_core..stream..Stream$GT$9poll_next17h151f4c8b09c7b2daE + 133
    20  deno                                0x000000010673fadc _ZN53_$LT$S$u20$as$u20$futures_core..stream..TryStream$GT$13try_poll_next17h45617ad1678f241bE + 28
    21  deno                                0x00000001065cae38 _ZN120_$LT$futures_util..stream..try_stream..try_collect..TryCollect$LT$St$C$C$GT$$u20$as$u20$core..future..future..Future$GT$4poll17hf88cea586ce4eda7E + 136
    22  deno                                0x000000010620bc3b std::future::poll_with_tls_context::h3c4c00ee19d21d3c + 155
    23  deno                                0x000000010653b907 _ZN4deno9inspector20DenoInspectorSession22receive_from_websocket28_$u7b$$u7b$closure$u7d$$u7d$17hbf06988b461b777dE + 375
    24  deno                                0x0000000106211e44 _ZN80_$LT$std..future..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h5d662fb3d20bb9fbE + 68
    25  deno                                0x000000010645a26e _ZN72_$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$4poll17ha5ae0f4497565b08E + 94
    26  deno                                0x000000010643ed35 futures_util::future::future::FutureExt::poll_unpin::h5b5f580d0a6cdf80 + 53
    27  deno                                0x00000001067fa967 _ZN86_$LT$deno..inspector..DenoInspectorSession$u20$as$u20$core..future..future..Future$GT$4poll17h6bc3a1d130c6d12fE + 55
    28  deno                                0x00000001061bf119 _ZN75_$LT$alloc..boxed..Box$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$4poll17ha74b4452fc9f307fE + 73
    29  deno                                0x00000001067f5513 _ZN117_$LT$futures_util..stream..futures_unordered..FuturesUnordered$LT$Fut$GT$$u20$as$u20$futures_core..stream..Stream$GT$9poll_next17he9848791cf4d1f65E + 1875
    30  deno                                0x00000001067f6975 futures_util::stream::stream::StreamExt::poll_next_unpin::h5f44bb2dda789730 + 53
    31  deno                                0x00000001067f9c91 deno::inspector::DenoInspector::poll_sessions::hc402e9cc32d088a1 + 1537
    32  deno                                0x00000001067f8e1a _ZN93_$LT$deno..inspector..DenoInspector$u20$as$u20$rusty_v8..inspector..V8InspectorClientImpl$GT$25run_message_loop_on_pause17h45bfe0577abb04efE + 490
    33  deno                                0x00000001078748ad v8_inspector__V8InspectorClient__BASE__runMessageLoopOnPause + 45
    34  deno                                0x0000000108478aff v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, v8::debug::ExceptionType, bool) + 687
    35  deno                                0x0000000107a2c15c v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>) + 1212
    36  deno                                0x0000000107a2b0a4 v8::internal::Debug::Break(v8::internal::JavaScriptFrame*, v8::internal::Handle<v8::internal::JSFunction>) + 756
    37  deno                                0x00000001080a6051 v8::internal::__RT_impl_Runtime_DebugBreakOnBytecode(v8::internal::Arguments<(v8::internal::ArgumentsType)0>, v8::internal::Isolate*) + 961
    38  deno                                0x0000000108adbb3f Builtins_CEntry_Return2_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 63
    39  deno                                0x0000000108d02a71 Builtins_DebugBreak2Handler + 401
[1]    36518 illegal hardware instruction  ./target/debug/deno run --inspect-brk -A

@piscisaureus
Copy link
Member Author

Works fine for me... can you try the latest revision?

image

cli/state.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member

Works fine for me... can you try the latest revision?

Works for me as well:
Screenshot 2020-05-12 at 23 17 38

@piscisaureus
Copy link
Member Author

Kewl. Now there are just 1000 test failures to iron out...

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 12, 2020
@piscisaureus piscisaureus changed the title WIP: Hack up inspector @piscisaureus Make --inspect-brk pause on the first line of _user_ code May 12, 2020
@piscisaureus piscisaureus changed the title @piscisaureus Make --inspect-brk pause on the first line of _user_ code Make --inspect-brk pause on the first line of _user_ code May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants