'How do I bind JS files to VS Code debugger for a SaaS plug-in app?
I've written a vanilla Javascript application that's a plug-in for some Software as a Service we subscribe to. I haven't been able to figure out how to use VS Code's debugger with it because I don't run the app on localhost. The script files don't load in the VS Code's Loaded Scripts panel and my breakpoints are unbound.
In order to test my application, I run the SaaS's sdk in the terminal and then point a browser to mysoftwareservice.com and append ?dev=true to the URL. Then my local application appears in the browser. The sdk requires that I have Node installed, but I don't know whether my app would be considered to be a Node app or not.
The only way I have been able to successfully connect the debugger to the app in the browser is to open Edge in debug mode (cmd start msedge.exe --remote-debugging-port=9222), navigate to mysoftwareservice.com?dev=true and then use the Attach to Edge configuration in launch.json.
"name": "Attach to Edge",
"port": 9222,
"request": "attach",
"type": "pwa-msedge",
"webRoot": "${workspaceFolder}/app" //I've also tried ${workspaceFolder}
The debugger attaches, but my breakpoints don't work because they're unbound. How can I get them to bind?
I've had a hard time finding a solution because I don't know whether my app would be considered to be a Node app or not (The sdk requires that I have Node installed.) I also don't know whether this would be considered remote debugging.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
