I have a deployed a NodeJS app on Digitalocean's app platform and its exposed on myserver.ondigitalocean.app
My intention is to connect it with VSCode on my computer and run the debugger remotely.
So far I've managed to tell App Platform to start the app using node --inspect myserver.js.
NodeJS starts in inspect mode giving me a url + UUID (similar to ws://127.0.0.1:9229/unique-UUID-f63b0f33d55e to connect my debugger.
As you can see, the inspector's URL is pointing to localhost which is fine, but I'm having issues trying to connect it to my VSCode locally.
In theory all I should do is configure my VSCode launch.json to point to the public URL and add the UUID provided by the inspector (essentially this ws://myserver.ondigitalocean.app/unique-UUID-f63b0f33d55e) but it's not working (I haven't found official DigitalOcean documentation on how to achieve this so I'm assuming based on NodeJS's documentation)
Checking the official NodeJS remote debugging documentation, it seems that I could do a SSH tunnel to the server and that way I would be able to use VSCode debugger as "local" while it is really hitting the remote server through the tunnel. Now, the problem with this approach is that DigitalOcean App Platform doesn't allow SSH access.
This is how my launch.json file looks like, perhaps I'm missing something.
{
"type": "pwa-node",
"request": "attach",
"name": "Attach to remote",
"address": "ws://myserver.ondigitalocean.app:9229/unique-UUID-f63b0f33d55e",
"port": 9229
}
Maybe App Platform doesn't expose port 9229 or WS? Or maybe I'm configuring the launch file in the wrong way.
Thanks for the help!