@@ -57,12 +57,20 @@ export class AppServerClient extends System {
5757
5858 setServerUrl ( url ) {
5959 // Check if dev server feature is enabled
60+ console . log ( '[AppServerClient] Checking if dev server is enabled:' , env . PUBLIC_DEV_SERVER )
6061 const isDevServerEnabled = env . PUBLIC_DEV_SERVER === 'true'
61- if ( ! isDevServerEnabled ) return
62+ if ( ! isDevServerEnabled ) {
63+ console . log ( '[AppServerClient] Dev server feature is disabled, aborting setServerUrl' )
64+ return
65+ }
6266
67+ console . log ( '[AppServerClient] Setting server URL:' , url )
6368 const isWebSocket = url . startsWith ( 'ws' )
69+ console . log ( '[AppServerClient] isWebSocket:' , isWebSocket )
6470 this . wsUrl = isWebSocket ? url : url . replace ( / ^ h t t p s ? : / , url . startsWith ( 'https' ) ? 'wss:' : 'ws:' )
6571 this . url = isWebSocket ? url . replace ( / ^ w s s ? : / , url . startsWith ( 'wss' ) ? 'https:' : 'http:' ) : url
72+ console . log ( '[AppServerClient] wsUrl set to:' , this . wsUrl )
73+ console . log ( '[AppServerClient] url set to:' , this . url )
6674 this . connect ( )
6775 }
6876
@@ -79,6 +87,9 @@ export class AppServerClient extends System {
7987 onOpen = ( ) => {
8088 this . connected = true
8189
90+ console . log ( '[AppServerClient] Connected to app server' )
91+
92+
8293 // Authenticate with app server
8394 this . send ( {
8495 type : 'auth' ,
@@ -131,6 +142,7 @@ export class AppServerClient extends System {
131142
132143 send ( message ) {
133144 if ( this . ws && this . ws . readyState === WebSocket . OPEN ) {
145+ console . log ( '🔥 Sending message:' , message )
134146 this . ws . send ( JSON . stringify ( message ) )
135147 } else {
136148 console . warn ( '⚠️ App server not connected, cannot send message' )
0 commit comments