How do I debug server and client simultaneously in WebStorm?

旧街凉风 提交于 2021-01-29 05:52:07

问题


I have a node.js app that runs a server and sends index.html. The index.html interacts with the server.

I want to debug the complete app, but when I debug the app, WebStorm only debugs the server.

Is this even possible in WebStorm? If not, are there other tools that can do this?


回答1:


In the Node.js run configuration, Browser/Live Edit tab, specify the URL of your server, tick both After launch and with JavaScript debugger checkboxes - client-side debugger will be launched once you start your node server with this configuration, so that you will be able to debug both simultaneously, using a single run configuration.

See also https://www.jetbrains.com/help/webstorm/debugging-javascript-in-chrome.html#debugging_js_on_external_web_server for some hints on debugging client-side code run in browser



来源:https://stackoverflow.com/questions/56836011/how-do-i-debug-server-and-client-simultaneously-in-webstorm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!