finicky icon indicating copy to clipboard operation
finicky copied to clipboard

Display the profile used when debugging in the console

Open nynexman4464 opened this issue 3 years ago • 5 comments

I'm trying to configure finicky to open certain URLs in a different google chrome profile. It's hard to debug with the console because it only prints the name of the browser, and not the profile (assuming my config is not wrong). Could it also print profile being selected (if any)?

Screen Shot 2021-03-05 at 4 37 20 PM

My config:

module.exports = {
  defaultBrowser: {
    name: "Google Chrome",
    profile: "Profile 2",
  },
  handlers: [
    {
      // Open apple.com and example.org urls in Safari
      match: ["mycompany.com/*", "example.org/*"],
      browser: {
        name: "Google Chrome",
        profile: "Profile 2",
      },
    },
  ],
};

nynexman4464 avatar Mar 05 '21 21:03 nynexman4464

You could try something like this to see when the handler is being matched!

module.exports = {
  defaultBrowser: {
    name: "Google Chrome",
    profile: "Profile 2",
  },
  handlers: [
    {
      // Open apple.com and example.org urls in Safari
      match: ["mycompany.com/*", "example.org/*"],
      browser: () => {
        finicky.log("opening profile 2");
        return {
          name: "Google Chrome",
          profile: "Profile 2",
        }
      },
    },
  ],
};

Let me know if you still have problems. :)

johnste avatar Mar 05 '21 21:03 johnste

Interesting, ok missed that. I ended up using finicky.notify("Recieved url", urlString); stolen from another example, but .log is better. Still might be nice if it did that by default.

nynexman4464 avatar Mar 05 '21 22:03 nynexman4464

Yeah I agree. Will consider when I update the preferences window next.

johnste avatar Mar 06 '21 10:03 johnste

@nynexman4464 How do you turn on the Finicky Console? Can't find any docs on that

huyz avatar Mar 21 '21 11:03 huyz

@nynexman4464 How do you turn on the Finicky Console? Can't find any docs on that

Never mind, found it. I had turned off the menubar icon long ago. So I didn't remember it existed and I had to re-enable it to get to the console for debugging

huyz avatar Mar 21 '21 11:03 huyz