I'm trying to debug a VUE component in Laravel 5.5 project using VS Code.
The last version of VS Code is installed.
Debugger for Chrome 4.2.0 is installed.
All Chrome processes are killed.
launch.json in .vscode folder has the following code:
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8000",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"runtimeArgs": [
"--remote-debugging-port=9222"
]
},
]
I start the project from CMD like this:
λ php artisan serve
Laravel development server started: <http://127.0.0.1:8000>
I set a breakpoint in Vue component and start debugging (see image)
As the result, the project page is opened in Chrome, but breakpoint doesn't work.
It is greyed out with the following message:
Unverified breakpoint, Breakpoint ignored because generated code not found
(source map problem?)
I found 4 files with the name "webpack.mix.js" in the project folder. I have added the ".sourceMaps();" to each of them like this:
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sourceMaps();
After that I rebuild the project by:
npm run dev
But I didn't find any map files in CSS folder and the problem is still here.
