MCPcopy
hub / github.com/spicetify/cli / startDebugger

Function startDebugger

src/cmd/watch.go:235–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

233}
234
235func 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
255func enqueueWatchJob(job func()) {
256 watchQueueOnce.Do(func() {

Callers 3

WatchFunction · 0.85
WatchExtensionsFunction · 0.85
WatchCustomAppFunction · 0.85

Calls 7

GetDebuggerPathFunction · 0.92
PrintInfoFunction · 0.92
SendReloadFunction · 0.92
PrintErrorFunction · 0.92
PrintSuccessFunction · 0.92
EnableDevToolsFunction · 0.85
SpotifyRestartFunction · 0.85

Tested by

no test coverage detected