run observatory from command line with web app

240 views
Skip to first unread message

Tomasz Kubacki

unread,
Aug 9, 2015, 11:47:30 PM8/9/15
to Dart VM Observatory Discuss

Hi,


I tried to connect to observatory from cmd, so I've done following


1. generated new app with: stagehand web-simple

2. pub get

3. pub serve 

4. then - following instructions here https://www.dartlang.org/tools/observatory/get-started.html -  started observatory with:


 /usr/local/opt/dart/Chromium.app/Contents/MacOS/Chromium --DART_FLAGS="--steal_breakpoints --pause-isolates-on-start" http://localhost:8080


and got this output:


MacBook-Pro-Tomasz:simpleWebApp tomek$ /usr/local/opt/dart/Chromium.app/Contents/MacOS/Chromium --DART_FLAGS="--steal_breakpoints --pause-isolates-on-start" http://localhost:8080

[19274:1291:0809/183329:ERROR:renderer_main.cc(207)] Running without renderer sandbox

[19275:1291:0809/183329:ERROR:renderer_main.cc(207)] Running without renderer sandbox

Observatory listening on http://127.0.0.1:56065

Observatory listening on http://127.0.0.1:56068

[19279:1291:0809/183334:ERROR:renderer_main.cc(207)] Running without renderer sandbox

Observatory listening on http://127.0.0.1:56072

[19280:1291:0809/183336:ERROR:renderer_main.cc(207)] Running without renderer sandbox

Observatory listening on http://127.0.0.1:56078




First it's strange that Observatory seems to start twice (sic!). Observatory page states:


"Disconnected from VM: Connection saw corrupt JSON message: FormatException: SyntaxError: Unexpected number 


[Connect to a VM]"


Screenshot: http://ibin.co/2BZ6xo1JVk1a


My dart --version

Dart VM version: 1.11.3 (Mon Aug  3 04:37:15 2015) on "macos_x64"


Any idea why it's not starting ?





Tomasz Kubacki

unread,
Aug 10, 2015, 5:28:19 AM8/10/15
to Dart VM Observatory Discuss
Ok it seems above *is* working fine on linux - filled bug here: https://github.com/dart-lang/sdk/issues/24029

John McCutchan

unread,
Aug 10, 2015, 1:30:19 PM8/10/15
to Tomasz Kubacki, Dart VM Observatory Discuss
Hi,

An Observatory is hosted for each Dart VM instance. When starting up, Dartium opens multiple tabs, resulting in multiple VM instances. 

A simpler way to use Observatory with Dartium is:

1) Launch Dartium without any command line flags.
2) Navigate a tab to your Dart app.
3) Open up DevTools and you'll see the URL for the Observatory for this tab.

HTH,
John

--
You received this message because you are subscribed to the Google Groups "Dart VM Observatory Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.

Tomasz Kubacki

unread,
Aug 11, 2015, 2:31:30 PM8/11/15
to Dart VM Observatory Discuss, tomasz....@gmail.com
John,

Thanks for your reply.

I followed your instructions but stil can't connect to app vm and got:

Disconnected from VM: Connection saw corrupt JSON message: FormatException: SyntaxError: Unexpected number 

[Connect to a VM]

Is there any way I can dig deeper ?

cheers,
t.k
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-discuss+unsub...@dartlang.org.

John Mccutchan

unread,
Aug 12, 2015, 1:43:52 PM8/12/15
to Tomasz Kubacki, Dart VM Observatory Discuss
Hi,

I have just tested 1.12.0-dev5.2 macos_ia32 locally with a Box2D web application. Everything worked when I did the following:

0) $ pub serve
1) $ dartium --DART_FLAGS="--steal_breakpoints --pause-isolates-on-start"
2) Navigate to localhost:8080
3) Open up DevTools
4) Click the Observatory link.

I tried the CPU profile and everything looked good.

Without a reproducible using the latest dev channel release I can't do much more.

Thanks,
John

To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.

--
You received this message because you are subscribed to the Google Groups "Dart VM Observatory Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.
Reply all
Reply to author
Forward
0 new messages