Open gadamsgh opened 5 years ago
Carlo assumes it manages windows and --auto-open-devtools-for-tabs
breaks that assumption I guess...
Yep, I've been encountering the same issue on Mac.
A crude workaround:
const app = await carlo.launch({ args: ['--auto-open-devtools-for-tabs'] });
app.on('exit', () => process.exit());
app.serveFolder(__dirname);
await app.createWindow(); // create a second window
await app.mainWindow().close(); // dispose the first window
await app.load('index.html');
When debugging, it is useful to automatically launch devtools for the window, using the "--auto-open-devtools-for-tabs" flag.
Example main.js:
Most of the time, google.com (site being launched in this case, happens with any site) will open in one window, and devtools will open in another window:
Occasionally, both windows will initialize but google.com will open in the window intended for devtools (making the devtools inaccessible), leaving the window intended for google.com in an odd state. This occurs maybe 20% of the time on my Windows 10 machine.