I often will set breakpoints in my routes and then go use the app in the browser. You can also step through the code using the debug menu in the top middle of VSCode. You can then set watchers, breakpoints (or disable them), see the call stack, or examine local variables. The node server will start and stop at the first line of code in app.js. Once the debug configuration is established you can choose your configuration form the dropdown and click the green button, or alternatively press F5 to begin debugging. This is important when you want to see how the node server is being started. It will also stop upon entry, so you can debug on the first entry point to the app.js. Notice the type is set to node and the program to start is set to /src/server/app.js (choose your path accordingly). Here you can define a launch configuration for debugging. This opens the debug configuration settings (in. Then click on the gear icon next to the debug button in the upper left. First, click on the debug icon in the sidebar or CMD+SHIFT+D. You can debug server side JavaScript in right in VSCode. Getting Started with Visual Studio Code.Visual Studio Code Seriesįollow this series to learn more about what you can do with Visual Studio Code! You may also be using task automation with gulp or grunt and want to start the server and then attach VSCode’s debugger to it. Perhaps you use TypeScript and need to compile it to JavaScript before starting the server. You may have a simple node server to crank up. There are various ways you can debug server side code with VSCode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |