vue-vben-admin icon indicating copy to clipboard operation
vue-vben-admin copied to clipboard

开发环境,断点调试,源代码行数对不上

Open SD-Gaming opened this issue 3 years ago • 11 comments

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • [ ] Read the docs.
  • [ ] Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • [ ] This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

2.8.0版本,Chrome断点,行数不正确,推测是某个vite插件把sourcemap映射错了,没时间试是哪个插件导致的

但是,vite-plugin-vue-setup-extend这个插件肯定是有这个问题,但是不止这个插件

Reproduction

任意断点即可重现,在.vue文件调试时出现,.ts文件中正常 GIF 2022-3-15 11-56-16

System Info

  • Operating System: win10 21H2
  • Node version: v16.14.0
  • Package manager (npm/yarn/pnpm) and version: pnpm 6.32.3

SD-Gaming avatar Mar 15 '22 04:03 SD-Gaming

我也遇到不能调试的问题,文件都是压缩过的,请问解决了吗

mamba-in avatar Mar 24 '22 09:03 mamba-in

我也遇到不能调试的问题,文件都是压缩过的,请问解决了吗

没有,没时间去研究了凑合用

SD-Gaming avatar Mar 25 '22 05:03 SD-Gaming

是用了setup in script的方法吗?我这边所有用setup-script写的组件也都是这个问题。

Walk4Muscle avatar Mar 27 '22 08:03 Walk4Muscle

vite-plugin-vue-setup-extend 主要就是这个插件导致的,其次好像是页面层级的问题,具体没找到。不过单独弄一个index.vue文件是可以生效了,所以应该不是vite插件导致的了。

Gardent avatar Mar 28 '22 08:03 Gardent

同样的问题, 我还以为是我的浏览器坏掉了

dennislan avatar Mar 30 '22 00:03 dennislan

同样的问题

  • 使用vite-plugin-vue-setup-extend后,断点到了被编译后的代码无法调试,推测是magic-string相关的问题。
  • 不使用vite-plugin-vue-setup-extend,debugger的时候,ts文件没问题,vue单文件行数会错乱。

Carnia avatar Apr 02 '22 02:04 Carnia

一样的问题...

chenguang1994 avatar Apr 12 '22 07:04 chenguang1994

一样的问题,怎么解决啊,调试好烦

zhangsai521314 avatar May 19 '22 13:05 zhangsai521314

是用了setup in script的方法吗?我这边所有用setup-script写的组件也都是这个问题。

我试了使用vue create创建一个新项目,使用

zhangsai521314 avatar May 19 '22 13:05 zhangsai521314

对比 使用2.7.1版本就可以了

zhangsai521314 avatar May 20 '22 08:05 zhangsai521314

看我这个方法,能够临时对付一下 #2228

adeewu avatar Sep 17 '22 07:09 adeewu

感谢您提出的问题!在我维护这个项目之前,似乎已经有人修复了这个问题并且没有关闭这个issue。由于我无法复现该错误,我相信该问题已经解决。如果您仍然遇到类似的问题,请随时告诉我,我会尽力提供帮助!

wangjue666 avatar Nov 10 '23 03:11 wangjue666