uni-app hbuilder开启调试模式后(uni/nvue调试),调试工具和手机app都显示白板,无法正常使用

uni-app hbuilder开启调试模式后(uni/nvue调试),调试工具和手机app都显示白板,无法正常使用 项目相关信息整理如下:

信息类型 内容
开发环境 HBuilderX
版本号 4.36(vue3)
项目创建方式 使用 dxap-cli-template 模板

项目第一次开启调试模式(uni/nvue调试)按照这个教程 HBuilderX调试工具和手机app都显示白板

Image from dcloud

退出调试模式,就能正常打印console.log、APP正常显示:

Image from dcloud

下面是不用调试模式的打印日志:

[广告] 15:34:28.923 uni-app 项目一键发布到鸿蒙元服务,领取现金奖励,详情
15:34:28.986 项目 'dxap-cli-template' 开始编译...
15:34:32.434 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。
15:34:32.456 编译器版本:4.36(vue3)
15:34:32.479 正在编译中...
15:34:33.691 uni_modules/geek-app-update, uni_modules/uni-config-center, uni_modules/uni-id-common 使用了uniCloud,而项目未启用uniCloud。需在项目点右键创建uniCloud环境
15:34:44.541 [plugin:vite-plugin-eslint] src/pages/web/index.vue:
15:34:44.562 D:\codeDataBase\Work\zhongdian\dxap-cli-template\src\pages\web\index.vue
15:34:44.584   11:5  warning  Attribute ':showClose' must be hyphenated   vue/attribute-hyphenation
15:34:44.607   12:5  warning  Attribute 'cancelText' must be hyphenated   vue/attribute-hyphenation
15:34:44.630   13:5  warning  Attribute 'confirmText' must be hyphenated  vue/attribute-hyphenation
15:34:44.656 ✖ 3 problems (0 errors, 3 warnings)
15:34:44.681   0 errors and 3 warnings potentially fixable with the `--fix` option.
15:34:44.720
15:34:44.751 [plugin:vite-plugin-eslint] src/pages/mapSelect/mapSelect.vue:
15:34:44.781 D:\codeDataBase\Work\zhongdian\dxap-cli-template\src\pages\mapSelect\mapSelect.vue
15:34:44.813    3:3  warning  Attribute ':showResetting' must be hyphenated                vue/attribute-hyphenation
15:34:44.845    4:3  warning  v-on event '[@commitCheck](/user/commitCheck)' must be hyphenated                 vue/v-on-event-hyphenation
15:34:44.879    5:3  warning  Attribute ":mapKey" should go before "[@commitCheck](/user/commitCheck)"          vue/attributes-order
15:34:44.910    5:3  warning  Attribute ':mapKey' must be hyphenated                       vue/attribute-hyphenation
15:34:44.936    6:3  warning  Attribute ":Radius" should go before "[@commitCheck](/user/commitCheck)"          vue/attributes-order
15:34:44.966    6:3  warning  Attribute ':Radius' must be hyphenated                       vue/attribute-hyphenation
15:34:45.000    7:3  warning  Attribute ":listIco" should go before "[@commitCheck](/user/commitCheck)"         vue/attributes-order
15:34:45.040    7:3  warning  Attribute ':listIco' must be hyphenated                      vue/attribute-hyphenation
15:34:45.082    8:3  warning  Attribute ":orientationIco" should go before "[@commitCheck](/user/commitCheck)"  vue/attributes-order
15:34:45.124    8:3  warning  Attribute ':orientationIco' must be hyphenated               vue/attribute-hyphenation
15:34:45.172    9:3  warning  Attribute ":resettingIco" should go before "[@commitCheck](/user/commitCheck)"    vue/attributes-order
15:34:45.209    9:3  warning  Attribute ':resettingIco' must be hyphenated                 vue/attribute-hyphenation
15:34:45.249   10:3  warning  Attribute ":configData" should go before "[@commitCheck](/user/commitCheck)"      vue/attributes-order
15:34:45.286   10:3  warning  Attribute ':configData' must be hyphenated                   vue/attribute-hyphenation
15:34:45.334 ✖ 14 problems (0 errors, 14 warnings)
15:34:45.391   0 errors and 13 warnings potentially fixable with the `--fix` option.
15:34:45.432
15:34:45.496 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.538 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.567 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.597 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.628 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.660 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.699 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.716 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.747 [[@vue](/user/vue)/compiler-sfc] defineEmits is a compiler macro and no longer needs to be imported.
15:34:45.762
15:34:45.790 [[@vue](/user/vue)/compiler-sfc] defineProps is a compiler macro and no longer needs to be imported.
15:34:45.812
15:34:45.844 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.874 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.907 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:45.942 More info: https://sass-lang.com/d/legacy-js-api
15:34:45.971 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.001 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.029 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.059 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.074 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.103 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.135 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.167 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.198 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.231 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.264 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.290 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.319 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.348 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.377 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.404 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.430 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.463 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.494 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.522 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.553 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.582 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.616 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.631 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.664 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.688 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.714 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.739 More info: https://sass-lang.com/d/legacy-js-api
15:34:46.769 DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
15:34:46.795 More info: https://sass-lang.com/d/legacy-js-api
15:34:49.018 项目 'dxap-cli-template' 编译成功。
15:34:49.048 运行方式:打开 HBuilderX, 导入 dist\dev\app-plus 运行。
15:34:49.086 ready in 18504ms。
15:34:49.232 正在建立手机连接...
15:34:50.073 手机端调试基座版本号为1.0.0, 版本号相同,跳过基座更新
15:34:51.709 正在同步手机端程序文件...
15:34:52.028 同步手机端程序文件完成
15:34:53.655 正在启动自定义基座...
15:34:55.264 App Launch at App.vue:4
15:34:55.265 App Show at App.vue:8

更多关于uni-app hbuilder开启调试模式后(uni/nvue调试),调试工具和手机app都显示白板,无法正常使用的实战教程也可以访问 https://www.itying.com/category-93-b0.html

6 回复

调整是通过wifi网络连接,需要确保手机连接的网络可以正常访问电脑。其次查看手机的网络设置,不要设置代理。 另外,如果是使用自定义调试基座,为了确保自定义基座中的SDK和HX版本一致,请重新生成自定义基座。

更多关于uni-app hbuilder开启调试模式后(uni/nvue调试),调试工具和手机app都显示白板,无法正常使用的实战教程也可以访问 https://www.itying.com/category-93-b0.html


安装这样设置也没用。

又试了卸载的hbuilder的最新稳定版本,安装了hbuilder的最新alpha版本,刚开始也能正常调试,隔一会儿又不行了

回复 9***@qq.com: 做了什么操作不行了?

回复 DCloud_App_Array: 就是正常的调试操作。没有修改代码

针对您提到的uni-app在HBuilder中开启调试模式后(uni/nvue调试),调试工具和手机APP显示白板的问题,这通常可能是由于多种原因导致的,包括但不限于代码错误、资源加载问题、配置不当等。由于您要求不给出建议而尽量提供代码案例,这里我将提供一个基础的调试和排查流程的代码示例,以及可能涉及的配置文件检查方法,帮助您定位问题。

1. 检查manifest.json配置

确保manifest.json中的app-plus配置正确无误,特别是与调试相关的设置。以下是一个基本的manifest.json配置示例:

{
  "app-plus": {
    "distribute": {
      "sdkConfigs": {}
    },
    "debug": {
      "remoteDebug": true  // 确保开启远程调试
    }
  }
}

2. 检查pages.json页面配置

确认pages.json中的页面路径配置正确,没有指向错误的文件或路径。以下是一个简单的页面配置示例:

{
  "pages": [
    {
      "path": "pages/index/index",
      "style": {
        "navigationBarTitleText": "首页"
      }
    }
  ]
}

3. 示例代码:简单的uni-app页面

确保您的页面代码没有语法错误。以下是一个简单的uni-app页面示例:

<template>
  <view class="content">
    <text>Hello, uni-app!</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello, uni-app!'
    };
  }
}
</script>

<style>
.content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
</style>

4. 清理缓存和重启

有时候,简单的清理项目缓存和重启HBuilderX可以解决问题。您可以在HBuilderX中尝试以下操作:

  • 清理项目缓存:工具 -> 清理项目缓存
  • 重启HBuilderX

5. 查看控制台输出

检查HBuilderX的控制台输出,看是否有错误信息。这可以帮助您快速定位问题。

如果以上步骤仍未解决问题,建议检查是否有最新的HBuilderX和uni-app框架更新,或者尝试在不同的设备上进行调试,以排除设备特定的问题。希望这些示例和步骤能帮助您解决问题。

回到顶部