()
| 233 | } |
| 234 | |
| 235 | func startDebugger() { |
| 236 | if len(utils.GetDebuggerPath()) == 0 { |
| 237 | EnableDevTools() |
| 238 | SpotifyRestart("--remote-debugging-port=9222", "--remote-allow-origins=*") |
| 239 | utils.PrintInfo("Restarted Spotify with debugger on. Waiting...") |
| 240 | for len(utils.GetDebuggerPath()) == 0 { |
| 241 | // Wait until debugger is up |
| 242 | } |
| 243 | } |
| 244 | autoReloadFunc = func() { |
| 245 | if utils.SendReload(&debuggerURL) != nil { |
| 246 | utils.PrintError("Could not reload Spotify") |
| 247 | utils.PrintInfo(`Close Spotify and run watch command again`) |
| 248 | os.Exit(1) |
| 249 | } else { |
| 250 | utils.PrintSuccess("Reloaded Spotify") |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func enqueueWatchJob(job func()) { |
| 256 | watchQueueOnce.Do(func() { |
no test coverage detected