Navigating api calls from webstorm to visual studio Follow
Part of my code is in React and I am using WebStorm for this development.
Part of my code is in C# and I am using VisualStudio for this development.
My C# has endpoints that I am calling from WebStorm using fetch js.
How can I use breakpoints in VS to trace api calls that were called from WebStorm?
Please sign in to leave a comment.
sorry, but I can hardly advise on using Visual Studio... I suppose that you need running your C# code in debugger and add breakpoints to methods that are triggered when you call them using fetch js
Thank you for your response Elena.
That is indeed what I am doing, I use breakpoints in the VS C# code and call the C# endpoints from WebStorm.
Trouble is I am not breaking on the VisualStudio code. I do stop at the VS C# code only if I externally initial a REST api call from the browser but not from WebStorm.
WebStorm runs my React app and is sending api requests. VisualStudio is where the endpoints are. I am running my React app and using the WebStorm debugger I see the fetch calls to the end points but on the VisualStudio side my breakpoints do not work as if those api calls never happened.
It may or may not be related to WebStorm. It is just that when I send those same api calls from the browser that is opened by WebStorm (using the development tools on the browser) I can see those calls on the VisualStudio code and I can use breakpoints in VS to capture those calls (the calls from the browser that is).
>WebStorm runs my React app and is sending api requests
No, the app is run with Node.js + browser; the IDE just starts the corresponding NPM scripts/commands.