Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 在wsl ubuntu的VS代码中创建react应用程序并进行调试_Visual Studio Code_Create React App_Windows Subsystem For Linux_Vscode Debugger_Chrome Debugging - Fatal编程技术网

Visual studio code 在wsl ubuntu的VS代码中创建react应用程序并进行调试

Visual studio code 在wsl ubuntu的VS代码中创建react应用程序并进行调试,visual-studio-code,create-react-app,windows-subsystem-for-linux,vscode-debugger,chrome-debugging,Visual Studio Code,Create React App,Windows Subsystem For Linux,Vscode Debugger,Chrome Debugging,我试图用VS代码调试运行在WSL中的CRA应用程序,结果非常奇怪。 如果我在VS代码中设置了一个断点-它根本不起作用。 如果我在chrome->source->localhost:3000/home/user/project/src/components/Component中打开开发者工具,我在那里设置了断点,然后在VS代码中看到了相同的文件,但是文件的路径很奇怪\home\user\project\src\components\Component 我相信源代码映射有问题,但无法确定具体是什么。

我试图用VS代码调试运行在WSL中的CRA应用程序,结果非常奇怪。 如果我在VS代码中设置了一个断点-它根本不起作用。 如果我在chrome->source->
localhost:3000/home/user/project/src/components/Component
中打开开发者工具,我在那里设置了断点,然后在VS代码中看到了相同的文件,但是文件的路径很奇怪
\home\user\project\src\components\Component

我相信源代码映射有问题,但无法确定具体是什么。 如果我在Windows中运行相同的代码,断点正在工作


有没有人有过在WSL中调试VS代码的经验?对那个问题有什么想法吗

wsl容器有自己的文件系统,因此需要远程wsl调试扩展


使用Linux@eugene monakoff

这可能与这个问题有关。这个答案毫无帮助。