diff --git a/scripts/code.sh b/scripts/code.sh index 542efab523786..a074797ce0f90 100755 --- a/scripts/code.sh +++ b/scripts/code.sh @@ -5,10 +5,6 @@ set -e if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } ROOT=$(dirname "$(dirname "$(realpath "$0")")") - - # On Linux with Electron 2.0.x running out of a VM causes - # a freeze so we only enable this flag on macOS - export ELECTRON_ENABLE_LOGGING=1 else ROOT=$(dirname "$(dirname "$(readlink -f $0)")") if grep -qi Microsoft /proc/version; then @@ -50,6 +46,7 @@ function code() { export VSCODE_DEV=1 export VSCODE_CLI=1 export ELECTRON_ENABLE_STACK_DUMPING=1 + export ELECTRON_ENABLE_LOGGING=1 # Launch Code exec "$CODE" . "$@" diff --git a/scripts/test.bat b/scripts/test.bat index 7f5f5f8df8ef7..0d1350a79ece2 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -16,6 +16,7 @@ node build\lib\electron.js if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron :: Run tests +set ELECTRON_ENABLE_LOGGING=1 %CODE% .\test\electron\index.js %* popd diff --git a/scripts/test.sh b/scripts/test.sh index ac96627846f2f..e1ed5aa65c796 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,10 +4,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } ROOT=$(dirname $(dirname $(realpath "$0"))) - - # On Linux with Electron 2.0.x running out of a VM causes - # a freeze so we only enable this flag on macOS - export ELECTRON_ENABLE_LOGGING=1 else ROOT=$(dirname $(dirname $(readlink -f $0))) fi @@ -31,10 +27,12 @@ node build/lib/electron.js || ./node_modules/.bin/gulp electron # Unit Tests if [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ + ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ test/electron/index.js "$@" else cd $ROOT ; \ + ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ test/electron/index.js "$@" fi