Skip to content

Is it possible to add a field to disable AutoLaunch? #135

Description

@HereOrCode

Why add the disableAutoLaunch field?

disableAutoLaunch: true // Do not auto-open the browser
disableAutoLaunch: false // Auto open the Browser

For example:

https://github.com/aklinker1/vite-plugin-web-extension/blob/161921596f71f760a30d18a3a355de31f2bba97e/packages/vite-plugin-web-extension/src/index.ts#L19


I set disableAutoLaunch to true and manually loaded the chrome-mv3 directory for development so that I could easily debug the background.js

shot0

Currently using WXT, and I've encountered a debugging issue: How to debug background.js?

shot1

Activity

  1. aklinker1 commented on Sep 30, 2023

    @aklinker1
    Member

    @code4you2021 you need to enable dev mode in chrome to see the inspect view. You've done it in your personal profile, but not the blank profile that web-ext opens in by default.

    I'll add this feature, because there are other cases where this is useful, but in your case, you just need to toggle the switch in the top right corner of chrome://extensions.

    Screen.Recording.2023-09-30.at.8.24.54.AM.mov

    I'll look into seeing if it's possible to enable this setting by default when opening the browser from WXT.

  2. aklinker1 commented on Sep 30, 2023

    @aklinker1
    Member

    Released in v0.6.6. See #136 for how to disable opening the browser automatically.

  3. HereOrCode commented on Oct 1, 2023

    @HereOrCode
    Author

    @aklinker1

    I found a problem, when disable is true, the output folder is hidden.

    Can it be a visible directory?

    disable: true // out folder visible (output/chrome-mv3)
    disable: false // out folder hidden (.output/chrome-mv3)
    
  4. aklinker1 commented on Oct 1, 2023

    @aklinker1
    Member

    @code4you2021 The output folder is visible in the output file list, regardless of runner.disabled.

    runner.disabled: false

    Screenshot 2023-09-30 at 9 42 27 PM

    runner.disabled: true

    Screenshot 2023-09-30 at 9 44 31 PM
  5. aklinker1 commented on Oct 1, 2023

    @aklinker1
    Member

    Oh, I see what you mean, it's a hidden directory that starts with a dot.

    I think you're mistaken, it's always a hidden directory, regardless of runner.disabled. This directory is hard coded that way

    I don't plan on making it a non-hidden directory. I might add a config option for it though.

    If you have trouble opening the directory, most terminals will let you ctrl+click a directory to open it in the system file explorer. Editors also let you open a file's location in the system file explorer.

  6. HereOrCode commented on Oct 1, 2023

    @HereOrCode
    Author

    I'm sorry I didn't express myself very clearly

    If runner.disabled is set to true and the out folder is hidden, chrome will not load the out folder.

  7. aklinker1 commented on Oct 1, 2023

    @aklinker1
    Member

    No worries! On Mac, cmd+shift+. will show hidden files.

    Screen.Recording.2023-09-30.at.11.32.04.PM.mov

    You can also drag and drop the directory onto the chrome://extensions

    Screen.Recording.2023-09-30.at.11.34.50.PM.mp4
  8. HereOrCode commented on Oct 1, 2023

    @HereOrCode
    Author

    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions