File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,13 +81,11 @@ function processCommand(line) {
8181 case "setDebugMode" :
8282 if ( jsonCmd . commandData ) {
8383 console . log = savedConsoleLog ;
84+ console . log ( "Debug Mode Enabled" ) ;
8485 } else {
8586 console . log = function ( ) { } ; // swallow logs
8687 }
8788 _sendResponse ( "done" , jsonCmd . commandID ) ; return ;
88- case "setPhoenixFSDebugMode" :
89- PhoenixFS . setDebugMode ( jsonCmd . commandData ) ;
90- _sendResponse ( "done" , jsonCmd . commandID ) ; return ;
9189 case "getEndpoints" :
9290 serverPortPromise . then ( port => {
9391 _sendResponse ( {
@@ -131,6 +129,8 @@ getFreePort().then((port) => {
131129 console . log ( 'Server Opened on port: ' , port ) ;
132130
133131 PhoenixFS . CreatePhoenixFsServer ( server , PHOENIX_FS_URL ) ;
132+ // PhoenixFS.setDebugMode(true); // uncomment this line to enable more logging in phoenix fs lib
133+
134134 // Start the HTTP server on port 3000
135135 server . listen ( port , ( ) => {
136136 serverPortResolve ( port ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ if(Phoenix.browser.isTauri) {
2626 TERMINATE : "terminate" ,
2727 PING : "ping" ,
2828 SET_DEBUG_MODE : "setDebugMode" ,
29- SET_PHOENIX_FS_DEBUG_MODE : "setPhoenixFSDebugMode" ,
3029 HEART_BEAT : "heartBeat" ,
3130 GET_ENDPOINTS : "getEndpoints"
3231 } ;
@@ -53,7 +52,7 @@ if(Phoenix.browser.isTauri) {
5352 window . isNodeTerminated = true ;
5453 console . log ( `PhNode: command finished with code ${ data . code } and signal ${ data . signal } ` ) ;
5554 if ( ! resolved ) {
56- reject ( ) ;
55+ reject ( "PhNode: closed - Terminated." ) ;
5756 }
5857 } ) ;
5958 command . on ( 'error' , error => console . error ( `PhNode: command error: "${ error } "` ) ) ;
@@ -98,6 +97,7 @@ if(Phoenix.browser.isTauri) {
9897 fs . forceUseNodeWSEndpoint ( true ) ;
9998 resolve ( message ) ;
10099 } ) ;
100+ execNode ( NODE_COMMANDS . SET_DEBUG_MODE , window . debugMode ) ;
101101 setInterval ( ( ) => {
102102 if ( ! window . isNodeTerminated ) {
103103 execNode ( NODE_COMMANDS . HEART_BEAT ) ;
You can’t perform that action at this time.
0 commit comments