How can I call an API which is being served by the vscode debugger?
I would usually call http://localhost:3000/api/plugins
, but clearly my project isn't served on that port. My launch.json look like this:
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/server/app.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"console": "internalConsole",
"sourceMaps": false,
"outDir": null
},
and the output from the debug console:
node --debug-brk=12834 --nolazy server\app.js
Debugger listening on [::]:12834
MongoDB Connection Succesful
I have tried the API with Postman on both localhost:12834
and localhost:5858
(which is the port in the attach configuration - neither work...