@nativescript/windows 0.1.0-alpha.79 → 0.1.0-alpha.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,6 +43,19 @@ namespace __PROJECT_NAME__
43
43
  [DllImport(NativeScriptLibrary, EntryPoint = nameof(runtime_pump_timers))]
44
44
  private static extern void runtime_pump_timers();
45
45
 
46
+ #if DEBUG
47
+ [DllImport(NativeScriptLibrary, EntryPoint = nameof(ns_set_log_to_console))]
48
+ private static extern int ns_set_log_to_console(int enabled);
49
+
50
+ public static bool TrySetLogToConsole(bool enabled)
51
+ {
52
+ try { return ns_set_log_to_console(enabled ? 1 : 0) == 1; }
53
+ catch { return false; }
54
+ }
55
+ #else
56
+ public static bool TrySetLogToConsole(bool enabled) => false;
57
+ #endif
58
+
46
59
  public void PumpTimers()
47
60
  {
48
61
  if (!_initialized) return;
@@ -115,6 +128,7 @@ namespace __PROJECT_NAME__
115
128
  runtime_set_local_folder(Windows.Storage.ApplicationData.Current.LocalFolder.Path);
116
129
  _runtime = runtime_init(AppContext.BaseDirectory);
117
130
  #if DEBUG
131
+ TrySetLogToConsole(true);
118
132
  if (ConsumeDebugBreakMarker())
119
133
  StartDevtoolsSafely();
120
134
  #endif
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/windows",
3
- "version": "0.1.0-alpha.79",
3
+ "version": "0.1.0-alpha.80",
4
4
  "description": "NativeScript for using Windows v8",
5
5
  "repository": {
6
6
  "type": "git",