首页 > 其他分享 >electron disable inspect

electron disable inspect

时间:2024-10-20 17:20:55浏览次数:1  
标签:Disables app inspect electron disable true FuseV1Options

 https://github.com/electron-userland/electron-builder/issues/6365   import { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses'   async function initApp() {   const exePath = app.getPath('exe')   await flipFuses(     exePath, // Returns the path to the electron binary     {       version: FuseVersion.V1,       [FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE       [FuseV1Options.EnableCookieEncryption]: true, // Enables cookie encryption       [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable       [FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of CLI options       [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enables validation of the app.asar archive on macOS       [FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of its normal search paths       [FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process       [FuseV1Options.GrantFileProtocolExtraPrivileges]: true // Grants the file protocol extra privileges     }   ) }   程序启动后调用initApp。 虽然端口可以连上(client debugger可以连上),但是调试协议会失效

标签:Disables,app,inspect,electron,disable,true,FuseV1Options
From: https://www.cnblogs.com/wjx0912/p/18487536

相关文章

  • 如何创建Electron + Vue3项目, 并调用C# dll
    依赖环境当前系统环境为win11,真正上手才知道环境问题才是最大的问题,希望本文能帮你节约时间。本文参考以下资料https://www.electronforge.io/guides/framework-integration/vue-3perplexity.ai和kimi.ai提供其他相关资料nodejs在开发前需要确定你要调用的dll是32位还是64位......
  • STMicroelectronics 意法半导体芯片选型表
    意法半导体作为全球知名的半导体厂商,其产品广泛应用于各个领域,从消费电子到工业控制,从汽车电子到通信设备,都能看到意法半导体芯片的身影。在电子硬件设计领域,芯片的选型至关重要。亿配芯城(ICgoodFind)一直致力于为广大硬件工程师提供优质的电子元器件服务。今天,我们特别为大家带......
  • DevEco Studio:Inspector双向预览
    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(MaoistLearning)➤博客园地址:为敢技术(https://www.cnblogs.com/strengthen/ )➤GitHub地址:https://github.com/strengthen➤原文地址:https://www.cnblogs.com/strengthen/p/......
  • electron-builder 在打包universal的时候报错 both x64 and arm64 builds and not cov
    ⨯Detectedfile"Contents/Resources/src/files/adbtool/mac/adb"that'sthesameinbothx64andarm64buildsandnotcoveredbythex64ArchFilesrule:"undefined"failedTask=buildstackTrace=Error:Detectedfile"Contents/Re......
  • electron-vite_4使用WebContentsView快速集成已有项目
    Web嵌入官方推荐使用WebContentsView;集成也比较简单,但还是需要你单独写点东西;src/main/index.ts进行修改import{app,shell,BrowserWindow,ipcMain,nativeImage,WebContentsView,dialog}from'electron';functioncreateWindow():void{//1.创建br......
  • electron-vite_6js-cookie失效
    我们项目是用了js-cookie,后续集成的时候发现,无法进入首页;经过排查是js-cookie无法使用,可能是electron打包后的项目运行的时候是file:///猜测原因:因为Cookie是与域名相关联的,而file:///协议没有域名,因此Cookie可能无法正常工作。file:///C:/Users/Administrator/AppData/......
  • 运行使用Electron-forge打包的electron package时遇到在js文件中执行的exec命令和在渲
    js文件中执行的exec命令出错很可能是项目中使用了一些非html,css,js的源文件,比如用了Makefile来编译了cpp代码,或者执行的exec命令为cpdir/something.cpp之类的文件操作命令。可以使用修改forge.config.js文件配置的方式,使得npmrunmake的时候自动把Makefile等exec命令中用到......
  • ELX304 – Electronic Systems
    ELX304–ElectronicSystemsIndividualCourseworkAssignmentDigitalDesignSUBMISSIONONLINEon13/10/2024viaCANVASIntroductionThiscourseworkexercisewillprovideyouwiththeopportunitytodemonstratetheskillsyouhavedevelopedthroughout......
  • [Electron] 应用不关闭窗口退出而是保留到后台运行
    import{app,BrowserWindow,Tray,Menu}from"electron";import{fileURLToPath}from"url";importpathfrom"path";const__filename=fileURLToPath(import.meta.url);const__dirname=path.dirname(__filename);lettray......
  • [Electron] 搭建 Vite+Electron 项目
    安装搭建Vite项目(根据官方文档搭建),安装electron、nodemon。pnpminstallelectronnodemon-D配置electron/main.jsfile:[electron/main.js]import{app,BrowserWindow}from"electron";constcreateWindow=()=>{constwin=newBrowserWindow({wid......