Debugging a Shopify app generated with Shopify CLI in VS Code was the main issue. The app runs locally on localhost:8081 and is exposed through an ngrok URL, but trying to attach the Chrome debugger directly to localhost or the ngrok root caused a 400 Bad Request on /auth, because the app flow expects a valid Shopify store context.
Key clarification and workaround:
The debugger can be attached using the URL https://<ngrok-url>/auth/inline?shop=<test-shop-url>.
ngrok is the tunneling service that exposes the local app publicly.
The app also needs Embedded app disabled in the Shopify app settings, so it can be opened outside the Shopify admin iframe while debugging.
The screenshots were relevant because they showed the attempted VS Code Chrome attach configuration. The discussion reached a partial resolution: the missing embedded-app setting was identified, but there was still an open question about why the app continued redirecting into Shopify after disabling it, possibly due to a delay in settings propagation.
Apologies, I misunderstood. I was able to attach the debugger by setting the URL to https:///auth/inline?shop= and disabling ‘embedded app’ from the App settings.
I disabled “Embedded app” in Shopify App Bridge in App settings, the app still redirects and loads in Shopify for some reason. I’m guessing it might take some time to update? I will update how it goes. Thank you so much!