Coder Social home page Coder Social logo

zh-lx / code-inspector Goto Github PK

View Code? Open in Web Editor NEW
1.4K 16.0 105.0 4.42 MB

Click the dom on the page, it will open your IDE and position the cursor to the source code location of the dom.

Home Page: https://inspector.fe-dev.cn/en

License: MIT License

TypeScript 100.00%
vue vscode webpack-plugin code devtools inspector react vite-plugin

code-inspector's People

Contributors

1070152533 avatar bigbossx avatar lzzzs avatar unstone avatar w2xi avatar zcf0508 avatar zh-lx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-inspector's Issues

monorepo 本地优化

现在我的仓库是 Monorepo 的,比如要本地启动 packages/A,现在 A 是 import 了 B 的,需要能够在页面上 跳转到 packages/B 的 代码里

因为 monorepo 在 yarn install 的时候把 packages 下的模块 symlink 到了 node_modules 下,所以现在是不支持跳转到 B 里的,

另外还需要映射到 packages B 的真实路径 pacakges/B/src/xxx,而不是 node_modules/B/src/xxx

支持 Astro 框架

image

我发现Astro已经在网页上添加源码位置信息了,但找了半天不知道如何使用

点击页面元素没反应

mac系统下,点击页面元素没反应,且终端控制台提示如下错误:
image
添加如下配置,点击跳转正常,建议在README中补充下:
image

支持强制在当前vscode打开文件

因为我设置vscode在新窗口打开文件"window.openFilesInNewWindow": "on",,因此在使用该插件时会打开一个新的窗口。但实际上vscode的命令行有提供参数强制在当前编辑器打开:code -r xxx.ts

image

我觉得可以加个参数配置一下,不然我还得修改vscode的配置额。要是code命令的所有参数都支持配置那就更好了。

无法定位router-view里面组件的代码

如果一个MainFrame里面嵌入了一个router-view组件,查看这个组件里面的元素,只能定位到MainFrame这个vue文件,无法定位到router-view里面对应的组件的代码

使用 pnpm 安装 webpack 扩展出错

> pnpm install webpack-code-inspector-plugin --save-dev


ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "code-inspector-core@workspace:*" is in the dependencies but no package named "code-inspector-core" is present in the workspace

This error happened while installing the dependencies of [email protected]

不兼容webpack4吗

我在一个vue-cli3 的vue2 的老项目里引用了。 用默认的配置直接卡死,就是到50%左右就不动了。

Vue warning in console

插件很棒,但是调试窗口一直告警如下:
[Vue warn]: Extraneous non-props attributes (vc-path) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.

版本 0.0.12

页面上会始终呈现一个 click to open editor 的小框

页面上会始终呈现一个 click to open editor 的小框

经过判断是页面上这个元素code-inspector-component呈现的
十分抱歉,由于公司网络原因无法截图

webpack-code-inspector-plugin 0.0.10
nodejs 14.21.3
npm 6.14.18
operation win10
webpack 4.46.0
vue 3.2.39

接入后 code-inspector,操作终端报错

具体报错内容为:image

原因是:本地启动时设置了NODE_OPTIONS: "--openssl-legacy-provider" 导致的,移除是可以的,但是我这边依赖这个NODE_OPTIONS,会导致项目的其他错误,是否可以加个配置项,你这边启动进程时不要继承父进程的这个NODE_OPTIONS

我看了下代码大概在这个地方:
image

感谢感谢!!!

VScode 点击元素没有定位到,提示错误

'wmic' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
Failed to recognize IDE automatically, add something like CODE_EDITOR=code to the .env.local file in your project folder, or add editor: "code" to CodeInspectorPlugin config, and then restart the development server. Learn more: https://goo.gl/MMTaZt

windows vscode
插件版本 0.1.12

SSR项目中,build产物不含.html文件会报错:webpack-code-inspector-plugin Cannot find output HTML file。

你好,请问源码中,对于html文件的注入是必需的吗,ssr项目build产物不含html文件可以支持吗。
目前会在编译时报错:webpack-code-inspector-plugin Cannot find output HTML file

// 不依赖 html-webpack-plugin 注入代码
const injectCode = (
  code: string,
  assets: { [filename: string]: any },
  cb?: (params?: any) => void
) => {
  const files = Object.keys(assets).filter((name) => /\.html$/.test(name));
  if (!files.length) {
    if (cb) {
      ('webpack-code-inspector-plugin Cannot find output HTML file');
      cb(
        new Error('webpack-code-inspector-plugin Cannot find output HTML file')
      );
    }
  } else {
    files.forEach((filename: string) => {
      const source = assets[filename].source();
      const sourceCode = replaceHtml(source, code);
      assets[filename] = {
        source: () => sourceCode,
        size: () => sourceCode.length,
      };
    });
  }
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.