Skip to content

Instantly share code, notes, and snippets.

@vanowm
Last active April 6, 2022 12:52
Show Gist options
  • Save vanowm/421760821ed30fb32d81fb9f5ac304d1 to your computer and use it in GitHub Desktop.
Save vanowm/421760821ed30fb32d81fb9f5ac304d1 to your computer and use it in GitHub Desktop.
Electron console.trace() doesn't show all traces (https://stackoverflow.com/questions/71720061)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
</head>
</html>
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const mainWindow = new BrowserWindow({
width: 1000,
height: 800,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
mainWindow.loadFile('index.html')
mainWindow.webContents.openDevTools()
}
app.whenReady().then(() => {
createWindow()
app.on('activate', function () {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
})
{
"name": "depressed-negotiation-rule-y3932",
"productName": "depressed-negotiation-rule-y3932",
"description": "My Electron application description",
"keywords": [],
"main": "./main.js",
"version": "1.0.0",
"author": "V@no",
"scripts": {
"start": "electron ."
},
"dependencies": {},
"devDependencies": {
"electron-nightly": "20.0.0-nightly.20220330"
}
}
function test ()
{
setTimeout(() => console.trace("test"));
}
test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment