weexteam / devtool-for-Apache-Weex

debugger tools with chrome devtool for Apache Weex
MIT License
258 stars 40 forks source link

weex debug src/main.vue页面为空? #102

Open guoshimeihua opened 6 years ago

guoshimeihua commented 6 years ago

main.vue文件内容:

<template>
    <div id="app">
        <text class="title">Hello {{msg}}</text>
        <button class="btn" @click="handleClick">点击我</button>
    </div>
</template>

<style>
    #app {
        align-items: center;
        margin-top: 120px;
    }

    .title {
        font-size: 100px;
        color: red;
    }

    .btn {
        padding-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
        height: auto;
        font-size: 60px;
        color: red;
    }
</style>

<script>
    export default {
        data: {
            msg: 'World'
        },
        methods: {
            handleClick: function() {
                this.msg = 'Bruce';
            }
        }
    }
</script>

执行weex debug src/main.vue,用Playground App先扫第一个调试的码,再扫第二个main的码,打开Inspector后,在console输出这样的错误:

2018-01-11 12 12 48

且页面为空白,没有显示任何人内容出来,该怎么解决呢?如果是执行weex src/main.vue的话,页面是有内容的。现在没有内容,如下所示:

2018-01-11 12 17 01

该怎么解决这个问题呢?

Cody1988 commented 6 years ago

I Got the error , when I debug

weex debug src/index.vue

I think it's the error of weex-devtool because when I run with

weex src/index.vue

is ok

how to fix ? anyone knows

Cody1988 commented 6 years ago

@MaryWu any idea?

AugTang commented 6 years ago

我的不是空白,是一直在加载,求weex相关大佬出来指导

erha19 commented 6 years ago

Try to upgrade your weex-devtool to 0.3.3.

weex update weex-devtool@0.3.3
JaredCen commented 6 years ago

@erha19 This way to upgrade weex-devtool doesn't work!

D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\xtoolkit.js:50
      throw new Error('no command found depend on package "' + name + '"');
      ^

Error: no command found depend on package "weex-devtool"
    at XToolkit._updateCommand (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\xtoolkit.js:50:13)
    at Command._invoke (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\Command.js:72:28)
    at Command.run (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\Command.js:53:12)
    at XToolkit._runCmd (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\xtoolkit.js:123:27)
    at XToolkit._done (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\xtoolkit.js:140:12)
    at process.nextTick (D:\npm\node_modules\node_modules\weex-toolkit\node_modules\xtoolkit\lib\xtoolkit.js:78:14)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
JaredCen commented 6 years ago

I think weex update weex-debugger@latest may work out.

ifelseboyxx commented 6 years ago

I Got the error , when I debug. look the gif:

step 1 : weex debug src/xx.vue ,then use WeexPlayground scan step 2: scan the second QR code like this pic: It works


But if i use weex debug, i got the error.

@erha19 @guoshimeihua How to fix ,please ?