Angular - 找出范围父/子关系

时间:2016-06-22 14:07:18

标签: angularjs angularjs-scope

我正在开发一个复杂的角度应用程序。有map scope$rootScope关系从<code> goroutine 1495590 [running]: runtime/pprof.writeGoroutineStacks(0x324e0100, 0x11ad6060, 0x0, 0x0) c:/go/src/runtime/pprof/pprof.go:516 +0x84 runtime/pprof.writeGoroutine(0x324e0100, 0x11ad6060, 0x2, 0x0, 0x0) c:/go/src/runtime/pprof/pprof.go:505 +0x3c runtime/pprof.(*Profile).WriteTo(0xc71770, 0x324e0100, 0x11ad6060, 0x2, 0x0, 0x0) c:/go/src/runtime/pprof/pprof.go:236 +0xb4 github.com/astaxie/beego/toolbox.ProcessInput(0x11b3a110, 0x10, 0x324e0100, 0x11ad6060) D:/goproject/src/github.com/astaxie/beego/toolbox/profile.go:42 +0x2fd github.com/astaxie/beego.profIndex(0x324e0068, 0x11838080, 0x117de000) D:/goproject/src/github.com/astaxie/beego/admin.go:275 +0x147 net/http.HandlerFunc.ServeHTTP(0xa3e7f4, 0x324e0068, 0x11838080, 0x117de000) c:/go/src/net/http/server.go:1422 +0x34 net/http.(*ServeMux).ServeHTTP(0x11683cc0, 0x324e0068, 0x11838080, 0x117de000) c:/go/src/net/http/server.go:1699 +0x133 net/http.serverHandler.ServeHTTP(0x1189c080, 0x324e0068, 0x11838080, 0x117de000) c:/go/src/net/http/server.go:1862 +0x156 net/http.(*conn).serve(0x11ad6000) c:/go/src/net/http/server.go:1361 +0xc05 created by net/http.(*Server).Serve c:/go/src/net/http/server.go:1910 +0x343 goroutine 1 [chan receive, 127 minutes]: github.com/astaxie/beego.(*App).Run(0x1169e550) D:/goproject/src/github.com/astaxie/beego/app.go:182 +0x85a github.com/astaxie/beego.Run(0x0, 0x0, 0x0) D:/goproject/src/github.com/astaxie/beego/beego.go:66 +0x130 main.main() D:/goproject/src/github.com/rayingtech/restaurant/main.go:53 +0x27 goroutine 17 [syscall, 127 minutes, locked to thread]: runtime.goexit() c:/go/src/runtime/asm_386.s:1662 +0x1 goroutine 5 [syscall, 127 minutes]: os/signal.loop() c:/go/src/os/signal/signal_unix.go:22 +0x1a created by os/signal.init.1 c:/go/src/os/signal/signal_unix.go:28 +0x36 goroutine 6 [chan receive, 127 minutes]: database/sql.(*DB).connectionOpener(0x116deb40) c:/go/src/database/sql/sql.go:634 +0x3c created by database/sql.Open c:/go/src/database/sql/sql.go:481 +0x276 goroutine 7 [IO wait]: net.runtime_pollWait(0x31995d40, 0x72, 0x11b3a070) c:/go/src/runtime/netpoll.go:157 +0x55 net.(*pollDesc).Wait(0x118aa0d0, 0x72, 0x0, 0x0) c:/go/src/net/fd_poll_runtime.go:73 +0x35 net.(*ioSrv).ExecIO(0x11862998, 0x118aa038, 0x962b48, 0x8, 0x11b3a060, 0x11b822a0, 0x0, 0x0) c:/go/src/net/fd_windows.go:182 +0x122 net.(*netFD).acceptOne(0x118aa000, 0x11b82000, 0x2, 0x2, 0x118aa038, 0x31690000, 0x0, 0x0) c:/go/src/net/fd_windows.go:564 +0x1d4 net.(*netFD).accept(0x118aa000, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:594 +0x11f net.(*TCPListener).AcceptTCP(0x11890018, 0x118c2e3c, 0x0, 0x0) c:/go/src/net/tcpsock_posix.go:254 +0x47 net/http.tcpKeepAliveListener.Accept(0x11890018, 0x0, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:2135 +0x3d net/http.(*Server).Serve(0x1189c080, 0x31995e30, 0x11890018, 0x0, 0x0) c:/go/src/net/http/server.go:1887 +0x98 net/http.(*Server).ListenAndServe(0x1189c080, 0x0, 0x0) c:/go/src/net/http/server.go:1877 +0xe4 net/http.ListenAndServe(0x11892020, 0x5, 0x0, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:1967 +0x7a github.com/astaxie/beego.(*adminApp).Run(0x1169e548) D:/goproject/src/github.com/astaxie/beego/admin.go:419 +0x581 created by github.com/astaxie/beego.registerAdmin D:/goproject/src/github.com/astaxie/beego/hooks.go:90 +0x4d goroutine 8 [IO wait, 3 minutes]: net.runtime_pollWait(0x31995db8, 0x72, 0x1184d840) c:/go/src/runtime/netpoll.go:157 +0x55 net.(*pollDesc).Wait(0x11833870, 0x72, 0x0, 0x0) c:/go/src/net/fd_poll_runtime.go:73 +0x35 net.(*ioSrv).ExecIO(0x11862998, 0x118337d8, 0x962b48, 0x8, 0x1184d830, 0x119e8540, 0x0, 0x0) c:/go/src/net/fd_windows.go:182 +0x122 net.(*netFD).acceptOne(0x118337a0, 0x119e8460, 0x2, 0x2, 0x118337d8, 0x316904a8, 0x0, 0x0) c:/go/src/net/fd_windows.go:564 +0x1d4 net.(*netFD).accept(0x118337a0, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:594 +0x11f net.(*TCPListener).AcceptTCP(0x118629a8, 0x118c5ea8, 0x0, 0x0) c:/go/src/net/tcpsock_posix.go:254 +0x47 net/http.tcpKeepAliveListener.Accept(0x118629a8, 0x0, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:2135 +0x3d net/http.(*Server).Serve(0x11688f80, 0x31995e30, 0x118629a8, 0x0, 0x0) c:/go/src/net/http/server.go:1887 +0x98 net/http.(*Server).ListenAndServe(0x11688f80, 0x0, 0x0) c:/go/src/net/http/server.go:1877 +0xe4 github.com/astaxie/beego.(*App).Run.func4(0x1169e550, 0x11854c00, 0x5, 0x118841c0) D:/goproject/src/github.com/astaxie/beego/app.go:174 +0x35c created by github.com/astaxie/beego.(*App).Run D:/goproject/src/github.com/astaxie/beego/app.go:180 +0x83e goroutine 9 [chan receive, locked to thread]: net.(*ioSrv).ProcessRemoteIO(0x11862998) c:/go/src/net/fd_windows.go:138 +0xcc created by net.startServer c:/go/src/net/fd_windows.go:238 +0xc9 goroutine 10 [chan receive, 3 minutes, locked to thread]: net.(*ioSrv).ProcessRemoteIO(0x118629a0) c:/go/src/net/fd_windows.go:138 +0xcc created by net.startServer c:/go/src/net/fd_windows.go:240 +0x11e goroutine 353800 [IO wait, 114 minutes]: net.runtime_pollWait(0x31995ae8, 0x72, 0x11b480e0) c:/go/src/runtime/netpoll.go:157 +0x55 net.(*pollDesc).Wait(0x1190b170, 0x72, 0x0, 0x0) c:/go/src/net/fd_poll_runtime.go:73 +0x35 net.(*ioSrv).ExecIO(0x11862998, 0x1190b0d8, 0x93ce80, 0x7, 0xa3ea10, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:182 +0x122 net.(*netFD).Read(0x1190b0a0, 0x1196e000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:463 +0x129 net.(*conn).Read(0x117c3648, 0x1196e000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/net.go:172 +0xb9 net/http.(*liveSwitchReader).Read(0x11ad6684, 0x1196e000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:219 +0x84 io.(*LimitedReader).Read(0x11b480b0, 0x1196e000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/io/io.go:427 +0xcb bufio.(*Reader).fill(0x11685b90) c:/go/src/bufio/bufio.go:97 +0x172 bufio.(*Reader).ReadSlice(0x11685b90, 0x1163380a, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/bufio/bufio.go:328 +0x1b4 bufio.(*Reader).ReadLine(0x11685b90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/bufio/bufio.go:357 +0x4b net/textproto.(*Reader).readLineSlice(0x11951a40, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/net/textproto/reader.go:55 +0x59 net/textproto.(*Reader).ReadLine(0x11951a40, 0x0, 0x0, 0x0, 0x0) c:/go/src/net/textproto/reader.go:36 +0x39 net/http.ReadRequest(0x11685b90, 0x11b47340, 0x0, 0x0) c:/go/src/net/http/request.go:653 +0x9a net/http.(*conn).readRequest(0x11ad6660, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:633 +0x368 net/http.(*conn).serve(0x11ad6660) c:/go/src/net/http/server.go:1319 +0x7a9 created by net/http.(*Server).Serve c:/go/src/net/http/server.go:1910 +0x343 goroutine 1421744 [IO wait, 7 minutes]: net.runtime_pollWait(0x31995b60, 0x72, 0x11841650) c:/go/src/runtime/netpoll.go:157 +0x55 net.(*pollDesc).Wait(0x119f0fb0, 0x72, 0x0, 0x0) c:/go/src/net/fd_poll_runtime.go:73 +0x35 net.(*ioSrv).ExecIO(0x11862998, 0x119f0f18, 0x93ce80, 0x7, 0xa3ea10, 0x4c201b, 0x0, 0x0) c:/go/src/net/fd_windows.go:182 +0x122 net.(*netFD).Read(0x119f0ee0, 0x11aac000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:463 +0x129 net.(*conn).Read(0x11863570, 0x11aac000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/net.go:172 +0xb9 net/http.(*liveSwitchReader).Read(0x1193d764, 0x11aac000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:219 +0x84 io.(*LimitedReader).Read(0x11893310, 0x11aac000, 0x1000, 0x1000, 0x27, 0x0, 0x0) c:/go/src/io/io.go:427 +0xcb bufio.(*Reader).fill(0x11b0a060) c:/go/src/bufio/bufio.go:97 +0x172 bufio.(*Reader).Peek(0x11b0a060, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/bufio/bufio.go:132 +0xad net/http.(*conn).readRequest(0x1193d740, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:629 +0x30e net/http.(*conn).serve(0x1193d740) c:/go/src/net/http/server.go:1319 +0x7a9 created by net/http.(*Server).Serve c:/go/src/net/http/server.go:1910 +0x343 goroutine 1495604 [IO wait, 3 minutes]: net.runtime_pollWait(0x31995908, 0x72, 0x11855690) c:/go/src/runtime/netpoll.go:157 +0x55 net.(*pollDesc).Wait(0x119fda30, 0x72, 0x0, 0x0) c:/go/src/net/fd_poll_runtime.go:73 +0x35 net.(*ioSrv).ExecIO(0x11862998, 0x119fd998, 0x93ce80, 0x7, 0xa3ea10, 0x4027a5, 0x0, 0x0) c:/go/src/net/fd_windows.go:182 +0x122 net.(*netFD).Read(0x119fd960, 0x11968000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/fd_windows.go:463 +0x129 net.(*conn).Read(0x117c2fd0, 0x11968000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/net/net.go:172 +0xb9 net/http.(*liveSwitchReader).Read(0x117077c4, 0x11968000, 0x1000, 0x1000, 0x449a00, 0x0, 0x0) c:/go/src/net/http/server.go:219 +0x84 io.(*LimitedReader).Read(0x1184d220, 0x11968000, 0x1000, 0x1000, 0x0, 0x0, 0x0) c:/go/src/io/io.go:427 +0xcb bufio.(*Reader).fill(0x11b6a120) c:/go/src/bufio/bufio.go:97 +0x172 bufio.(*Reader).Read(0x11b6a120, 0x11b68400, 0x21, 0x200, 0x1000, 0x0, 0x0) c:/go/src/bufio/bufio.go:207 +0x1b9 io.(*LimitedReader).Read(0x11840ee0, 0x11b68400, 0x21, 0x200, 0x11b17994, 0x0, 0x0) c:/go/src/io/io.go:427 +0xcb net/http.(*body).readLocked(0x11a212f0, 0x11b68400, 0x200, 0x200, 0x1000, 0x0, 0x0) c:/go/src/net/http/transfer.go:632 +0x7f net/http.(*body).Read(0x11a212f0, 0x11b68400, 0x200, 0x200, 0x0, 0x0, 0x0) c:/go/src/net/http/transfer.go:624 +0xe8 net/http.(*expectContinueReader).Read(0x11840ef0, 0x11b68400, 0x200, 0x200, 0x0, 0x0, 0x0) c:/go/src/net/http/server.go:569 +0x100 io.(*LimitedReader).Read(0x1184d510, 0x11b68400, 0x200, 0x200, 0x200, 0x0, 0x0) c:/go/src/io/io.go:427 +0xcb bytes.(*Buffer).ReadFrom(0x11b17ab4, 0x32520080, 0x1184d510, 0x0, 0x0, 0x0, 0x0) c:/go/src/bytes/buffer.go:173 +0x1c3 io/ioutil.readAll(0x32520080, 0x1184d510, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/io/ioutil/ioutil.go:33 +0x136 io/ioutil.ReadAll(0x32520080, 0x1184d510, 0x0, 0x0, 0x0, 0x0, 0x0) c:/go/src/io/ioutil/ioutil.go:42 +0x51 github.com/astaxie/beego/context.(*BeegoInput).CopyBody(0x11b38340, 0x4000000, 0x0, 0x0, 0x0, 0x0) D:/goproject/src/github.com/astaxie/beego/context/input.go:337 +0xd4 github.com/astaxie/beego.(*ControllerRegister).ServeHTTP(0x116edd60, 0x324e0068, 0x11ab1980, 0x11ae7b20) D:/goproject/src/github.com/astaxie/beego/router.go:652 +0x2cc0 net/http.serverHandler.ServeHTTP(0x11688f80, 0x324e0068, 0x11ab1980, 0x11ae7b20) c:/go/src/net/http/server.go:1862 +0x156 net/http.(*conn).serve(0x117077a0) c:/go/src/net/http/server.go:1361 +0xc05 created by net/http.(*Server).Serve c:/go/src/net/http/server.go:1910 +0x343 到应用程序最低级别的方法吗?

2 个答案:

答案 0 :(得分:1)

试试这个:https://chrome.google.com/webstore/detail/angularjs-batarang-stable/niopocochgahfkiccpjmmpchncjoapek?hl=en-US我在Angular项目中使用它来剖析所有范围。还有其他功能,但我只使用那个。一旦你安装它,它将在你的开发工具中。

答案 1 :(得分:1)

我使用ng-inspector。它是检查范围heirarchy的一个很好的工具。你可以找到它here