Giter Club home page Giter Club logo

Comments (9)

ltvolks avatar ltvolks commented on August 17, 2024 9

It is also useful to be able to setup and save Workspace settings across multiple invocations. It would be nice to be able to selectively inject saved DevTools settings into a fresh profile, but I'm not aware of any mechanism to do so. A brute force approach is to pass the --user-data-dir flag to a custom launcher:

    browsers: ['Chrome'],

    customLaunchers: {
      Chrome_DevTools_Saved_Prefs: {
        base: 'Chrome',
        flags: ['--user-data-dir=./tests/config/.chrome_dev_user']
      }
    }

Then:

karma start --browsers Chrome_DevTools_Saved_Prefs

This will allow you to reuse the profile and takes care of steps 4-7 (breakpoints are also preserved). When you want to test using a fresh profile, use the default Chrome launcher or wipe the user-data-dir.

from karma-chrome-launcher.

yarl avatar yarl commented on August 17, 2024 1

What is working for us is:

browsers: [
  'Chrome'
],
customLaunchers: {
  Chrome_DevTools_Saved_Prefs: {
    base: 'Chrome',
    flags: ['--auto-open-devtools-for-tabs']
  }
},

from karma-chrome-launcher.

sebas2day avatar sebas2day commented on August 17, 2024

+1
Too many steps to take to debug...

from karma-chrome-launcher.

scottohara avatar scottohara commented on August 17, 2024

Looks like Chrome will soon remember DevTools position/docked state in incognito mode, so there may be some opportunities to have karma remember it debug DevTools settings (http://crbug.com/376788#c45)

from karma-chrome-launcher.

dignifiedquire avatar dignifiedquire commented on August 17, 2024

It seems this planned to land in Chrome 44 stable. So lets see how much improvement that brings.
If you have any ideas what we could do from the karma side, I'm very open to suggestions.

from karma-chrome-launcher.

cesarvarela avatar cesarvarela commented on August 17, 2024

I think that making it open a new tab in the currently focused window (instead of a new instance and a new profile) is good enough.

Why isn't that the default behavior?

from karma-chrome-launcher.

Aaronius avatar Aaronius commented on August 17, 2024

It appears that the Chrome fix has landed and, while it does apply to an incognito window, it doesn't apply to the new window that karma-chrome-launcher opens.

from karma-chrome-launcher.

spicemix avatar spicemix commented on August 17, 2024

The Jetbrains karma runner is happy to use any currently subscribed browser window...if a browser is at localhost:9876 it just runs in that however it's set. Otherwise it launches one if instructed to.

That is the correct behavior as we can control the exact context if we want rather than being forced to cope with a vanilla one or edit config settings down in the bowels. But I don't always want to run Jetbrains and they have their own debugger problems. I want chrome debugger with my own extensions.

This is a very important piece of code and it really shouldn't be abandoned like this.

from karma-chrome-launcher.

darrentorpey avatar darrentorpey commented on August 17, 2024

@ltvolks That was exactly the answer I was looking for, even now in April 2017. Thank you! :)

from karma-chrome-launcher.

Related Issues (20)

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.