How can I use a debug launch configuration for multi-root workspaces in Visual Studio Code?

后端 未结 2 1432
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-22 04:06

Debugging from multi-root-workspaces does not seem to work - these are a new feature, maybe this is a bug, but there are no actual examples, just psudo-code on the website.

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-22 04:34

    Ok so simply put, nothing worked for me ! No launch configs, nothing !

    This is how I ran 1 debugging process, I'll proceed to tell how to run things together as well. Press Cmd+Shift+P , type 'auto attach' to switch on attaching files to debugger. Then PRESS Cmd+J to get the terminal out for your specific node folder. Type : node --inspect . in the terminal to run the debugger for that file.

    To run two debuggers, open two terminals in VS code. The idea is to attach debuggers on different ports.

    Go to folder 1 , type node --inspect=9229 .

    Go to folder 2 in 2nd terminal , type node --inspect=32089 .

    Note : Make sure auto-attach is On. It can also be toggled on the bottom of the VS Code screen.

提交回复
热议问题